Created
August 14, 2008 21:01
-
-
Save jessehattabaugh/5490 to your computer and use it in GitHub Desktop.
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 parseDate(date){ | |
//Tue, 12 Aug 2008 20:36:35 -0700 | |
var d = Date.parse(date.replace(/,/g,"").substring(4,25)) | |
if(d) return d | |
else { | |
dlog.error("couldn't parse date (",d,") from (",date,")") | |
return new Date() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment