Reign of Terror Solution
After implementing the difficult date and time parsing for Microsoft, you managed to find yourself elsewhere and elsewhen. (Or maybe you failed to implement such a trivial function, in which case you deserve what’s coming next.)
Somehow, you managed to find yourself in Paris, during the height of Maximilien Robespierre’s Reign of Terror. You were brought before said Maximilien Robespierre, and offered your services as a programmer to avoid being guillotined as a spy by the Committee of Public Safety. As Robespierre had already guillotined astronomers responsible for maintaining the calendar, he decided to let you maintain the calendar with your programming skills. Of course, if you fail this task, you would obviously be seen as a traitor and inevitably face the guillotine.
Now, recall that the French Republican calendar consists of 12 months of 30 days each, followed by 5 complementary days (6 in leap years). The 12 months are, in order: Vendémiaire, Brumaire, Frimaire, Nivôse, Pluviôse, Ventôse, Germinal, Floréal, Prairial, Messidor, Thermidor, Fructidor. The five complementary days are: la Fête de la Vertu, la Fête du Génie, la Fête du Travail, la Fête de l’Opinion, la Fête des Récompenses. On leap years, la Fête de la Révolution is added. The first day of the year in the French Republican calendar is 1 Vendémiaire, and the autumnal equinox using the mean solar time in Paris Observatory (longitude 2°20′14.03″ E) must fall on that date.
Unfortunately, you don’t actually know anything about astronomy. Fortunately for you, you were lucky enough to find a copy of JPL’s latest development ephemeris on your laptop along with a copy of the
skyfield library, which can tell you the exact time of the autumnal equinox for any year in the next ten thousand years. This could save your life, if you know how to do some basic math.
The input will contain two lines. The first line will be the time of the autumnal equinox of the year to generate the calendar for, i.e. this moment will be part of 1 Vendémiaire. The next line will contain the time of the autumnal equinox of the year after.
These times will be given in the ISO 8601 format using the Gregorian calendar, i.e.
YYYY-mm-ddTHH:MM:SS. However, to spare you the trouble of dealing with leap seconds, the times are given in UT1. The year is may have more than 4 digits, but its range is restricted to [1792,17150][1792,17150].
Output the list of dates of the year, and their corresponding dates in the Gregorian calendar. Your output should be encoded as UTF-8 with NFC normalization.
L'an 230 de la république française 1 Vendémiaire: 2021-09-22 2 Vendémiaire: 2021-09-23 3 Vendémiaire: 2021-09-24 4 Vendémiaire: 2021-09-25 5 Vendémiaire: 2021-09-26 6 Vendémiaire: 2021-09-27 7 Vendémiaire: 2021-09-28 8 Vendémiaire: 2021-09-29 9 Vendémiaire: 2021-09-30 10 Vendémiaire: 2021-10-01 11 Vendémiaire: 2021-10-02 12 Vendémiaire: 2021-10-03 13 Vendémiaire: 2021-10-04
Note: Please click one of our ads once we reach 20 click’s will release the solution’s. It help’s us to generate revenue and run this site
Calendar Contest Problem
- Sexagenary Cycle Solution
- Day of the Week Solution
- Classical Maya Solution
- Savvyday 29 Oatmeal 94
- Reign of Terror Solution
- Ming Dynasty Solution