Skip to content

Get the number of seconds/milliseconds in leap/noleap year.

License

Notifications You must be signed in to change notification settings

datetime/year-seconds

Repository files navigation

npm mit license build status coverage status deps status

Get the number of seconds/milliseconds in leap/noleap year.

Install

npm i --save year-seconds
npm test

API

For more use-cases see the tests

Get the number of seconds/milliseconds in leap/noleap year.

  • [year] {Number} year number, pass to year-days
  • [bool] {Boolean} when true, returns seconds, pass to day-seconds
  • return {Number}

Example:

var yearSeconds = require('year-seconds');

yearSeconds();
//=> 31536000000 milliseconds

yearSeconds(false);
//=> 31536000000 milliseconds

yearSeconds('str');
//=> 31536000000 milliseconds

yearSeconds(/regex/gi);
//=> 31536000000 milliseconds

yearSeconds([1, 2, 3]);
//=> 31536000000 milliseconds

yearSeconds(2016);
//=> 31622400000 milliseconds

yearSeconds(2016, true);
//=> 31622400 seconds

yearSeconds(2014);
//=> 31536000000 milliseconds

yearSeconds(2014, true);
//=> 31536000 seconds

Author

Charlike Mike Reagent

License MIT license

Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
Released under the MIT license.


Powered and automated by kdf, March 02, 2015

About

Get the number of seconds/milliseconds in leap/noleap year.

Resources

License

Stars

Watchers

Forks

Packages

No packages published