Skip to content

Instantly share code, notes, and snippets.

@2get
Created May 1, 2014 06:10
Show Gist options
  • Save 2get/7ad7ac590aca11dfb331 to your computer and use it in GitHub Desktop.
Save 2get/7ad7ac590aca11dfb331 to your computer and use it in GitHub Desktop.
Number of days elapsed.js
var d = new Date();
Math.floor((d.getTime() - new Date(d.getFullYear(), 0, 1).getTime()) / (1000 * 60 * 60 * 24));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment