Last active
October 12, 2015 13:58
-
-
Save joehom0416/4037709 to your computer and use it in GitHub Desktop.
javascript parse json date string to date time
This file contains hidden or 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
| function parseJsonDate(jsonDateString) { | |
| var d= new Date(parseInt(jsonDateString.replace('/Date(', ''))); | |
| return d.getFullYear() + "/" + d.getMonth() + "/" + d.getDate(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment