Date parsing and toISOString() can't be assumed to be present. Use Moment instead. Issue #323.
This commit is contained in:
parent
325eaf8c34
commit
9514c46aa0
@ -109,7 +109,7 @@ this.recline.Backend.Memory = this.recline.Backend.Memory || {};
|
||||
'float': function (e) { return parseFloat(e, 10); },
|
||||
number: function (e) { return parseFloat(e, 10); },
|
||||
string : function (e) { return e.toString() },
|
||||
date : function (e) { return new Date(e).valueOf() },
|
||||
date : function (e) { return moment(e).valueOf() },
|
||||
datetime : function (e) { return new Date(e).valueOf() }
|
||||
};
|
||||
var keyedFields = {};
|
||||
|
||||
@ -67,7 +67,7 @@ test('_parseDate', function () {
|
||||
];
|
||||
_.each(testData, function(item) {
|
||||
var out = view._parseDate(item[0]);
|
||||
if (out) out = out.toISOString();
|
||||
if (out) out = moment(out).toJSON();
|
||||
equal(out, item[1]);
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user