mirror of
https://github.com/samsonjs/strftime.git
synced 2026-04-27 14:57:37 +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
|
// 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) {
|
function Strftime(locale, customTimezoneOffset, useUtcTimezone) {
|
||||||
var _locale = locale || DefaultLocale,
|
var _locale = locale || DefaultLocale,
|
||||||
_customTimezoneOffset = customTimezoneOffset || 0,
|
_customTimezoneOffset = customTimezoneOffset || 0,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue