fix formatting dates as UTC seconds
This commit is contained in:
parent
98272ee54a
commit
439a0a58af
1 changed files with 4 additions and 1 deletions
|
@ -159,7 +159,10 @@ Ox.formatDate = function(date, str, utc) {
|
|||
['p', function(d) {return Ox.AMPM[Math.floor(Ox.getHours(d, utc) / 12)];}],
|
||||
['Q', function(d) {return Math.floor(Ox.getMonth(d, utc) / 4) + 1;}],
|
||||
['S', function(d) {return Ox.pad(Ox.getSeconds(d, utc), 2);}],
|
||||
['s', function(d) {return Math.floor(d.getTime() / 1000);}],
|
||||
['s', function(d) {
|
||||
return Math.floor(d.getTime() / 1000)
|
||||
- (utc ? Ox.getTimezoneOffset() / 1000 : 0);
|
||||
}],
|
||||
['U', function(d) {return Ox.pad(Ox.getWeek(d, utc), 2);}],
|
||||
['u', function(d) {return Ox.getISODay(d, utc);}],
|
||||
['V', function(d) {return Ox.pad(Ox.getISOWeek(d, utc), 2);}],
|
||||
|
|
Loading…
Reference in a new issue