9487ff9bae
no issue - preparation for using `ember-pikaday` that utilizes `ember-cli-moment-shim` - removes usage of `moment` global - removes custom imports of `moment` and `moment-timezone` libraries
19 lines
407 B
JavaScript
19 lines
407 B
JavaScript
import moment from 'moment';
|
|
import Transform from 'ember-data/transform';
|
|
|
|
export default Transform.extend({
|
|
deserialize(serialized) {
|
|
if (serialized) {
|
|
return moment(serialized);
|
|
}
|
|
return serialized;
|
|
},
|
|
|
|
serialize(deserialized) {
|
|
if (deserialized) {
|
|
return moment(deserialized).toDate();
|
|
}
|
|
return deserialized;
|
|
}
|
|
});
|