https://github.com/datetime/year-days
Get the number of days in a year
https://github.com/datetime/year-days
Last synced: 3 months ago
JSON representation
Get the number of days in a year
- Host: GitHub
- URL: https://github.com/datetime/year-days
- Owner: datetime
- License: mit
- Created: 2014-06-26T21:45:11.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2017-05-24T20:45:43.000Z (about 9 years ago)
- Last Synced: 2025-01-16T21:17:27.128Z (over 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# year-days [](https://travis-ci.org/datetime/year-days)
> Get the number of days in a year
## Install
```
$ npm install --save year-days
```
## Usage
```js
var yearDays = require('year-days');
yearDays(2014);
//=> 365
yearDays(2016);
//=> 366
```
## API
### yearDays([year])
#### year
Type: `number`
Default: current year
### yearDays([date])
#### date
Type: `date`
Default: `new Date()`
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)