minutes
Version:
Get the number of minutes for an hour, day, week and the elapsed minutes for the current day.
75 lines (54 loc) • 1.8 kB
Markdown
# {%= name %} {%= badge("fury") %}
> {%= description %}
{%= include("install-npm", {save: true}) %}
## Run tests
```bash
npm test
```
## Usage
```js
var minutes = require('{%= name %}');
// elapsed minutes today
console.log(minutes('today'));
//=> 1201
```
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue]({%= bugs.url %})
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 minutes since beginning of the day~~
- [ ] `month`: function to calculate minutes since beginning of the month
- [ ] `year`: function to calculate minutes since beginning of the year
I'm also open to other ideas for this lib.
## Related
Other libs I maintain
- [days]
- [hours]
- [month]
- [months]
- [seconds]
- [week]
- [weekday]
- [year]
From other maintainers
- [current-day-number]
- [current-week-number] - like [week] but takes a different approach to getting the week number.
- [week-hours]
## Author
{%= include("author") %}
## License
{%= copyright() %}
{%= license() %}
***
{%= include("footer") %}
[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
[hours]: https://github.com/jonschlinkert/hours
[minutes]: https://github.com/jonschlinkert/minutes
[month]: https://github.com/jonschlinkert/month
[months]: https://github.com/jonschlinkert/months
[seconds]: https://github.com/jonschlinkert/seconds
[week]: https://github.com/jonschlinkert/week
[weekday]: https://github.com/jonschlinkert/weekday
[year]: https://github.com/jonschlinkert/year