Created
February 9, 2014 08:10
-
-
Save sapandiwakar/8895998 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.IsodateTransform = DS.Transform.extend({ | |
deserialize: function (serialized) { | |
if (serialized) { | |
return moment(serialized).toDate(); | |
} | |
return serialized; | |
}, | |
serialize: function (deserialized) { | |
if (deserialized) { | |
return moment(deserialized).format(); | |
} | |
return deserialized; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment