Frequently, when writing time-related code, I write the following:
const SECONDS = 1000;
const MINUTES = 60 * SECONDS;
const HOURS = 60 * MINUTES;
const DAYS = 24 * HOURS;
(of course these are variables not constants, but they will never change, and I could make them un-changeable properties etc if I wanted to)
However I suspect these values already exist inside V8 / JavaScriptCore / Chakra and other JS engines.
- Is there a standard way to access these values in JavaScript, perhaps somewhere off the Date constructor?
- Is there a non-standard way to access these values, say something V8 specific?