Transform date of contributions in timestamp on export

This commit is contained in:
Benjamin Renard 2014-01-18 00:23:39 +01:00
parent ff1f865fce
commit 1c13315cce

View file

@ -311,6 +311,9 @@ function Contribution(contributor,cost,title,date,uuid,lastChange) {
this.contributor=contributor;
this.cost=cost;
this.title=title;
if (jQuery.type(date)!='date') {
date=moment(date).toDate();
}
this.date=date;
this.uuid=uuid || generate_uuid();
this.lastChange=lastChange || new Date().getTime();
@ -320,7 +323,7 @@ function Contribution(contributor,cost,title,date,uuid,lastChange) {
'uuid': this.uuid,
'cost': this.cost,
'title': encodeURIComponent(this.title),
'date': this.date,
'date': this.date.getTime(),
'lastChange': this.lastChange,
};
}