mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-09 06:28:28 +03:00
Fix intenaldate parser
This commit is contained in:
parent
1de1ecc9c4
commit
7dc9441852
12 changed files with 199 additions and 184 deletions
|
|
@ -46,7 +46,7 @@ function MessageModel()
|
|||
this.hasAttachments = ko.observable(false);
|
||||
this.attachmentsMainType = ko.observable('');
|
||||
|
||||
this.moment = ko.observable(moment());
|
||||
this.moment = ko.observable(moment(moment.unix(0)));
|
||||
|
||||
this.attachmentIconClass = ko.computed(function () {
|
||||
var sClass = '';
|
||||
|
|
@ -76,10 +76,6 @@ function MessageModel()
|
|||
return MessageModel.calculateFullFromatDateValue(this.dateTimeStampInUTC());
|
||||
}, this);
|
||||
|
||||
this.fullFormatDateValue = ko.computed(function () {
|
||||
return MessageModel.calculateFullFromatDateValue(this.dateTimeStampInUTC());
|
||||
}, this);
|
||||
|
||||
this.momentDate = Utils.createMomentDate(this);
|
||||
this.momentShortDate = Utils.createMomentShortDate(this);
|
||||
|
||||
|
|
@ -140,7 +136,7 @@ MessageModel.newInstanceFromJson = function (oJsonMessage)
|
|||
*/
|
||||
MessageModel.calculateFullFromatDateValue = function (iTimeStampInUTC)
|
||||
{
|
||||
return moment.unix(iTimeStampInUTC).format('LLL');
|
||||
return 0 < iTimeStampInUTC ? moment.unix(iTimeStampInUTC).format('LLL') : '';
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue