Skip to content

Instantly share code, notes, and snippets.

@jessehattabaugh
Created August 14, 2008 21:01
Show Gist options
  • Save jessehattabaugh/5490 to your computer and use it in GitHub Desktop.
Save jessehattabaugh/5490 to your computer and use it in GitHub Desktop.
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