Transform date of contributions in timestamp on export
This commit is contained in:
parent
ff1f865fce
commit
1c13315cce
1 changed files with 4 additions and 1 deletions
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue