Skip to content

Instantly share code, notes, and snippets.

@pthrasher
Forked from tebriel/a.js
Created January 31, 2012 02:55
Show Gist options
  • Save pthrasher/1708428 to your computer and use it in GitHub Desktop.
Save pthrasher/1708428 to your computer and use it in GitHub Desktop.
function formatJSONTime(jsonTime){
var matches = jsonTime.match(/date\((\d{13})\)/),
date = matches !== null ? formatTime(new Date(+matches[0])) : +new Date();
return date;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment