Skip to content

Instantly share code, notes, and snippets.

@louy
Created July 11, 2013 09:07
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 louy/5973862 to your computer and use it in GitHub Desktop.
Save louy/5973862 to your computer and use it in GitHub Desktop.
A method to calculate Julian Day in JavaScript. Note: this is different than Julian Date
Date.prototype.julianDay = function(){
return (this / 86400000) - (this.getTimezoneOffset()/1440) + 2440587.5;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment