Skip to content

Instantly share code, notes, and snippets.

@kayz1
Created September 19, 2013 20:54
Show Gist options
  • Save kayz1/6629694 to your computer and use it in GitHub Desktop.
Save kayz1/6629694 to your computer and use it in GitHub Desktop.
function randomDate(start, end) {
return new Date(start.getTime() + Math.random() * (end.getTime() - start.getTime()));
}
randomDate(new Date(2012, 0, 1), new Date());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment