Skip to content

Instantly share code, notes, and snippets.

@stargt
Created November 8, 2019 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stargt/0ec5cf4c578649380bfd43e11dfe3b4b to your computer and use it in GitHub Desktop.
Save stargt/0ec5cf4c578649380bfd43e11dfe3b4b to your computer and use it in GitHub Desktop.
Math.floor(((new Date('2019-01-01')).getDay()*24*60*60*1000 + (new Date('2019-11-08')).getTime() - (new Date('2019-01-01')).getTime())/1000/60/60/24/7 + 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment