Astronomical

NAME

Date::Calendar::FrenchRevolutionary::Astronomical - Conversions from / to the French Revolutionary calendar

SYNOPSIS

Converting from a Gregorian date to a French Revolutionary date


use Date::Calendar::FrenchRevolutionary::Astronomical;
my  Date $Bonaparte's-coup-gr;
my  Date::Calendar::FrenchRevolutionary::Astronomical
         $Bonaparte's-coup-fr;

$Bonaparte's-coup-gr .= new(1799, 11, 9);
$Bonaparte's-coup-fr .= new-from-date($Bonaparte's-coup-gr);

say $Bonaparte's-coup-fr;
# ---> "0008-02-18" for 18 Brumaire VIII
say "{.day-name} {.day} {.month-name} {.year} {.feast-long}" with  $Bonaparte's-coup-fr;
# ---> "Octidi 18 Brumaire 8 jour de la dentelaire"

Converting from a French Revolutionary date to a Gregorian date


use Date::Calendar::FrenchRevolutionary::Astronomical;
my  Date::Calendar::FrenchRevolutionary::Astronomical
         $Robespierre's-downfall-frv;
my  Date $Robespierre's-downfall-grg;

$Robespierre's-downfall-frv .= new(year =>  2, month => 11, day =>  9);
$Robespierre's-downfall-grg  = $Robespierre's-downfall-frv.to-date;
say $Robespierre's-downfall-grg;
# --> "1794-07-27"

DESCRIPTION

Date::Calendar::FrenchRevolutionary::Astronomical is a class representing dates in the French Revolutionary calendar. It allows you to convert a Gregorian date into a French Revolutionary date or the other way. This class uses the autumn equinox rule for computing the beginning of each year, even after year XX.

The Revolutionary calendar was in use in France from 24 November 1793 (4 Frimaire II) to 31 December 1805 (10 NivĂŽse XIV). The modules in this distribution extend the calendar to the present and to a few centuries in the future, not limiting to Gregorian year 1805.

This new calendar was an attempt to apply the decimal rule (the basis of the metric system) to the calendar. Therefore, the week disappeared, replaced by the décade, a 10-day period. In addition, all months have exactly 3 decades, no more, no less.

Since 12 months of 30 days each do not make a full year (365.24 days), there are 5 or 6 additional days at the end of a year. These days are called "Sans-culottides", named after a political faction, but we often find the phrase "jours complémentaires" (additional days). These days do not belong to any month, but for programming purposes, it is convenient to consider they form a 13th month.

At first, the year was beginning on the equinox of autumn, for two reasons. First, the republic had been established on 22 September 1792, which happened to be the equinox, and second, the equinox was a symbol for equality, the day and the night lasting exactly 12 hours each. It was therefore in tune with the republic's motto "Liberty, Equality, Fraternity". But it was not practical, so Romme proposed a leap year rule similar to the Gregorian calendar rule.

The distribution contains two other classes, one where the reform replacing the astronomical rule by the arithmetic rule took effect in year XX (1811), the other where this reform took effect at the creation of the calendar.

PROBLEMS AND KNOWN BUGS

Previously, the equinox rule had been generated according to Reingold and Dershowitz's book Calendar Calculations and the corresponding Common Lisp program calendrica-3.0.cl. I have found that running this program with the clisp interpreter gives different results from running the same program with the gcl interpreter. The first differences occur in Gregorian years 1807 and 1840. The French Revolutionary calendar was no longer in use, but still... I think it is caused by a rounding error which pushes the autumn equinox to the wrong side of midnight.

Anyhow, the values used in this version are the values produced by running calendar.l, which are identical when running clisp or gcl. No more rounding errors (I still have to check, though).

In addition, the algorithm used in Calendar Calculations is reliable, I think, for a few centuries, but not for several millenia. The problem is I do not know when I should stop computing autumn equinoxes. Let us say that after 500 or 1000 years, the errors will be too many. Before that, we will already have a few errors.

USAGE

See the documentation for the main class, Date::Calendar::FrenchRevolutionary.

AUTHOR

Jean Forget <J2N-FORGET at orange dot fr>

COPYRIGHT AND LICENSE

Copyright (c) 2019, 2020, 2024 Jean Forget, all rights reserved

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

Date::Calendar::FrenchRevolutionary v0.1.0

Conversions from / to the French Revolutionary calendar

Authors

  • Jean Forget

License

Artistic-2.0

Dependencies

Date::Calendar::Strftime

Test Dependencies

Provides

  • Date::Calendar::FrenchRevolutionary
  • Date::Calendar::FrenchRevolutionary::Arithmetic
  • Date::Calendar::FrenchRevolutionary::Astronomical
  • Date::Calendar::FrenchRevolutionary::Common
  • Date::Calendar::FrenchRevolutionary::Names

The Camelia image is copyright 2009 by Larry Wall. "Raku" is a trademark of the Yet Another Society. All rights reserved.

Built with Podlite — the markup and publishing tools behind this site.