Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

hours

jonschlinkert40MIT0.1.0

Get the number of hours for a day, week and the elapsed hours for the current day.

am, calendar, clock, date, day, days, duration, friday, hour, hours, hr, meridiem, min, minutes, monday, now, pm, saturday, sec, second, seconds, sunday, thursday, time, times, timespan, tuesday, wednesday, week, weekday

readme

hours NPM version

Get the number of hours for a day, week and the elapsed hours for the current day.

Install with npm

npm i hours --save

Run tests

npm test

Usage

var hours = require('hours');

// elapsed hours today
console.log(hours('today'));
//=> 19

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

I'd like to implement the following if someone wants to do a PR before I get around to them:

  • <input checked="" disabled="" type="checkbox"> today: function to calculate hours since beginning of the day
  • <input disabled="" type="checkbox"> month: function to calculate hours since beginning of the month
  • <input disabled="" type="checkbox"> year: function to calculate hours since beginning of the year

I'm also open to other ideas for this lib.

Other libs I maintain

From other maintainers

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert
Released under the MIT license


This file was generated by verb on December 07, 2014. To update, run npm i -g verb && verb.