![]() | This template is used onapproximately 2,300 pages and changes may be widely noticed. Test changes in the template's/sandbox or/testcases subpages, or in your ownuser subpage. Consider discussing changes on thetalk page before implementing them. |
This template takes a julian day number and returns the associated year number within the Gregorian calendar.
{{#expr: ( (({{{1}}})+32044 round 0) / 146097 + 0.5 round 0) * 400+ (( (({{{1}}})+32044 round 0) mod 146097 / 36524 + 0.5 round 0) * 3/4 + 0.5 round 0) * 100+ (( (({{{1}}})+32044 round 0) mod 146097 + 36524 - (( (({{{1}}})+32044 round 0) mod 146097 / 36524 + 0.5 round 0) * 3/4 + 0.5 round 0) * 36524 ) / 1461 + 0.5 round 0) * 4+ ((( (({{{1}}})+32044 round 0) mod 146097 + 36524 - (( (({{{1}}})+32044 round 0) mod 146097 / 36524 + 0.5 round 0) * 3/4 + 0.5 round 0) * 36524 ) mod 1461 / 365 + 0.5 round 0) * 3 / 4 + 0.5 round 0)+(((( (({{{1}}})+32044 round 0) mod 146097 + 36524 - (( (({{{1}}})+32044 round 0) mod 146097 / 36524 + 0.5 round 0) * 3/4 + 0.5 round 0) * 36524 ) mod 1461- ((( (({{{1}}})+32044 round 0) mod 146097 + 36524 - (( (({{{1}}})+32044 round 0) mod 146097 / 36524 + 0.5 round 0) * 3/4 + 0.5 round 0) * 36524 ) mod 1461 / 365 + 0.5 round 0) * 3 / 4 + 0.5 round 0) * 365 + 365) * 5 + 308) / 153 - 0.5 round 0) / 12- 5305.5round 0}}