Template:JULIANDAY.YEAR/doc

This template takes a julian day number and returns the associated year number within the Gregorian calendar.

Computing formula (partially indented)

 * For more information about how this formula works, see Julian day.


 * The actual formula in the template drops all whitespaces shown here, as well as the "0" in "0.5".
 * The constant 146097 is the number of days in 400 years (Gregorian calendar)
 * The constant 36524 is the number of days in 100 years (Gregorian calendar)
 * The constant 1461 is the number of days in 4 years (Gregorian calendar)
 * The constant 308 adjusts the number of days in a year since last March 1 (possibly from the previous year)
 * The constant 153 is the number of days every 5 months (in the same year starting on March 1) excepting the addition of 1 day on July 31 and December 31.