The date 0409·01·MO is New Year’s Day in the Ceres Calendar. Wish everyone and everything in the Asteroid Belt, Jupiter, Saturn and beyond a belated Happy New Year by writing a program to convert Julian Dates (JD) to Ceres Dates using these helpful landmarks:
JD CMJD Ceres Date (& Time*) ISO 8601 (approx.)
Start of Ceres calendar 2309103.500 0.000 0000·01·MO 00:00 1610
Start of JD calendar 0.000 -2309103.500 -6344·17·MO 4713 BCE
Earliest recorded eclipse 501822.000 -1807281.500 -4966·49·SU 3339 BCE
Battle of Megiddo 1189360.000 -1119743.500 -3077·41·FR 1456 BCE
Battle of Halys 1507900.000 -801203.500 -2202·47·WE 584 BCE
Alexander the Great (b) 1591596.000 -717507.500 -1972·43·SU 355 BCE
Crab Nebula supernova 2106216.000 -202887.500 -0558·33·MO 1054
Discovery of Galilean moons 2309107.000 3.500 0000·01·TH 1610
Discovery of Titan by Huygens 2325616.000 16512.500 0045·19·SU 1655
Discovery of Uranus by Herschel 2371629.000 62525.500 0171·41·TU 1781
Discovery of Ceres by Piazzi 2378862.000 69758.500 0191·34·TH 1801
Discovery of Pallas by Olbers 2379313.000 70209.500 0192·46·SU 1802
Discovery of Juno by Harding 2380201.000 71097.500 0195·17·SA 1804
Discovery of Vesta by Olbers 2381140.000 72036.500 0197·47·SU 1807
Discovery of Astraea by Hencke 2395274.000 86170.500 0236·39·MO 1845
Discovery of Neptune by Galle & Le Verrier 2395563.000 86459.500 0237·28·WE 1846
First Nobel Prizes awarded 2415729.000 106625.500 0292·49·TU 1901-12-10
Archduke Franz Ferdinand (d) 2420312.000 111208.500 0305·27·SU 1914-06-28
Discovery of Pluto by Tombaugh 2426054.000 116950.500 0321·16·TU 1930-03-18
Hiroshima bombing 2431673.469 122569.969 0336·38·SU 23:15 1945-08-05
Dawn probe started exploration of Ceres 2457088.028 147984.528 0406·29·FR 12:40 2015-03-06
Gravitational waves first detected by LIGO 2457279.910 148176.410 0407·05·MO 09:50 2015-09-14
New Year’s Day 0409 2457980.000 148876.500 0409·01·MO 12:00 2017-08-14
CMJD
stands for Ceres Modified JD, a convenient offset. CMJD
is related to JD
by the formula:
CMJD = JD - 2309103.5
The Ceres Calendar has 52 weeks (01 - 52) of seven days, with Monday (MO) as the first day of the week, the rest are TU, WE, TH, FR, SA, & SU and the time synchronized to UTC formatted as HH:MM or HH:MM:SS. There are no leap days in the Ceres Calendar.
* The Ceres Dates lacking times are only known to the day, so as a convention the middle of the day 12:00
is chosen as the time. Displaying 12:00
for these cases is perfectly acceptable.
Note that the Calendar starts on the Monday before Galileo discovered his satellites, that’s to have the start of the calendar on a Monday to correspond to the ISO 8601 start of the week. The discovery of the Galilean Satellites is more important to them than the Discovery of Ceres but not so important as to mess up the start of the week or the start of the year! That’s just how they roll!
Your program must convert JD ≥ 0.000
to Ceres Date
in the format above, using -
(U+2212 MINUS SIGN) and ·
(U+00B7 MIDDLE DOT) as required. Especially for those using ASCII-only languages, you can substitute ~
(U+007E TILDE) and *
(U+002A ASTERISK) for the minus sign and middle dot, respectively. The format for dates beyond 9999·52·SU
is undefined.
Here’s a handy page to convert to Julian Dates and lots of other useful information.
This is code-golf, so shortest answer in bytes wins.
SU
in the landmarks list, so must be that that is missing. \$\endgroup\$~
(U+007E TILDE) and*
(U+002A ASTERISK) for the minus sign and middle dot, respectively. \$\endgroup\$