https://github.com/datetime/seconds
Get the number of seconds for a minute, hour, day and week.
https://github.com/datetime/seconds
Last synced: 5 months ago
JSON representation
Get the number of seconds for a minute, hour, day and week.
- Host: GitHub
- URL: https://github.com/datetime/seconds
- Owner: datetime
- License: mit
- Created: 2014-12-07T07:24:00.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-08-29T23:26:23.000Z (almost 9 years ago)
- Last Synced: 2025-09-17T00:39:31.190Z (10 months ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 9
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# seconds [](http://badge.fury.io/js/seconds)
> Get the number of seconds for a minute, hour, day and week.
## Install
## Install with [npm](npmjs.org)
```bash
npm i seconds --save
```
## Run tests
```bash
npm test
```
## Usage
```js
var seconds = require('seconds');
seconds('minute');
//=> 60
```
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/seconds/issues)
I'd like to implement the following if someone wants to do a PR before I get around to them:
- [x] ~~`today`: function to calculate seconds since beginning of the day~~
- [ ] `month`: function to calculate seconds since beginning of the month
- [ ] `year`: function to calculate seconds since beginning of the year
I'm also open to other ideas for this lib.
## Related
From other maintainers
- [current-day-number]
- [current-week-number] - like [week] but takes a different approach to getting the week number.
- [week-hours]
Other libs I maintain
- [days]
- [month]
- [months]
- [week]
- [weekday]
- [year]
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright (c) 2014 Jon Schlinkert
Released under the MIT license
***
_This file was generated by [verb](https://github.com/assemble/verb) on December 07, 2014. To update, run `npm i -g verb && verb`._
[current-day-number]: https://github.com/tunnckoCore/current-day-number
[current-week-number]: https://github.com/tunnckoCore/current-week-number
[week-hours]: https://github.com/tunnckoCore/week-hours
[days]: https://github.com/jonschlinkert/days
[month]: https://github.com/jonschlinkert/month
[months]: https://github.com/jonschlinkert/months
[week]: https://github.com/jonschlinkert/week
[weekday]: https://github.com/jonschlinkert/weekday
[year]: https://github.com/jonschlinkert/year