Fix intenaldate parser

This commit is contained in:
RainLoop Team 2014-07-31 00:57:41 +04:00
parent 1de1ecc9c4
commit 7dc9441852
12 changed files with 199 additions and 184 deletions

View file

@ -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') : '';
};
/**