Created
June 12, 2011 16:58
-
-
Save danmux/1021756 to your computer and use it in GitHub Desktop.
parsing date string into a date object on iOs
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
// iOs or mobile webkit hacking | |
var syncdate = null; | |
if(model.synchdate) { | |
var arr = model.synchdate.split(/[- :T]/); | |
syncdate = new Date(arr[0], arr[1]-1, arr[2], arr[3], arr[4], arr[5]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment