Created
November 16, 2011 20:42
-
-
Save dmjio/1371311 to your computer and use it in GitHub Desktop.
convert json date to javascript date
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
convertDate: function (jsonDate) { | |
var someDate = new Date(+jsonDate.replace(/\/Date\((-?\d+)\)\//gi, "$1")); | |
return someDate; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment