mirror of
https://github.com/samsonjs/strftime.git
synced 2026-03-25 09:05:48 +00:00
polyfill Date.now for old browsers
This commit is contained in:
parent
23cd5feb98
commit
bfe34d92b5
1 changed files with 7 additions and 0 deletions
|
|
@ -85,6 +85,13 @@
|
|||
};
|
||||
// End of deprecated API
|
||||
|
||||
// Polyfill Date.now for old browsers.
|
||||
if (typeof Date.now !== 'function') {
|
||||
Date.now = function() {
|
||||
return +new Date();
|
||||
};
|
||||
}
|
||||
|
||||
function Strftime(locale, customTimezoneOffset, useUtcTimezone) {
|
||||
var _locale = locale || DefaultLocale,
|
||||
_customTimezoneOffset = customTimezoneOffset || 0,
|
||||
|
|
|
|||
Loading…
Reference in a new issue