Get the number of seconds/milliseconds in a day.
npm i --save day-seconds
npm test
For more use-cases see the tests
Get the number of seconds/milliseconds in a day.
[bool]
{Boolean} whentrue
, returns seconds, otherwise millisecondsreturn
{Number}
Example:
var daySeconds = require('day-seconds');
daySeconds(false);
//=> 86400000
daySeconds();
//=> 86400000
daySeconds('str');
//=> 86400000
daySeconds([1,2,3]);
//=> 86400000
daySeconds(/regex/gm);
//=> 86400000
daySeconds({});
//=> 86400000
daySeconds(true);
//=> 86400
Charlike Mike Reagent
Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
Released under the MIT
license.
Powered and automated by kdf, March 02, 2015