[ntp:questions] Understanding MJD in NTPv4 test cases

antony.arciuolo at oooii.com antony.arciuolo at oooii.com
Fri Aug 17 02:55:29 UTC 2012

Thanks! That source was helpful...

>From that source:
 * Some notes on the terminology:
 * We use the proleptic Gregorian calendar, which is the Gregorian
 * calendar extended in both directions ad infinitum. This totally
 * disregards the fact that this calendar was invented in 1582, and
 * was adopted at various dates over the world; sometimes even after
 * the start of the NTP epoch.

I suggest the Keeper Of The RFC add "We calculate JDN using proleptic Gregorian calendar extended in both directions ad infinitum."

That comment answers most of the question... though it still leave me confused with how the day number is calculated to get it to behave correctly everywhere AND be 0 at the epoch. For now my unit test will keep the documented values and pass ALL of them, but in my Day Number calc, I'll use Gregorian up until -2000, THEN fall back to Julian. Not the best, but at least the test cases pass for now and the hack is very isolated. Alas, I guess I'll just never know what day of the week when Stonehenge was completed.

More information about the questions mailing list