mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-26 16:26:44 +03:00
'Y-m-d\\TH:i:s' as 'ISO8601'
This commit is contained in:
parent
a451600d8b
commit
a9b336d90f
2 changed files with 2 additions and 2 deletions
|
|
@ -134,7 +134,7 @@ export const
|
|||
timeToNode = (element, time) => {
|
||||
try {
|
||||
if (time) {
|
||||
element.dateTime = (new Date(time * 1000)).format('Y-m-d\\TH:i:s');
|
||||
element.dateTime = (new Date(time * 1000)).format('ISO8601');
|
||||
} else {
|
||||
time = Date.parse(element.dateTime) / 1000;
|
||||
}
|
||||
|
|
|
|||
2
dev/prototype.js
vendored
2
dev/prototype.js
vendored
|
|
@ -46,7 +46,7 @@
|
|||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat
|
||||
Date.prototype.format = function (options, UTC, hourCycle) {
|
||||
if (typeof options == 'string') {
|
||||
if ('Y-m-d\\TH:i:s' == options) {
|
||||
if ('ISO8601' == options) {
|
||||
return this.getFullYear() + '-' + pad2(1 + this.getMonth()) + '-' + pad2(this.getDate())
|
||||
+ 'T' + pad2(this.getHours()) + ':' + pad2(this.getMinutes()) + ':' + pad2(this.getSeconds());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue