Author image Jean Forget
and 1 contributors

NAME

Date::Convert::French_Rev - Convert from / to French Revolutionary Calendar

SYNOPSIS

  use Date::Convert::French_Rev;

Converting from Gregorian (or other) to Revolutionary

    $date = Date::Convert::Gregorian->new(1799, 11, 9); # 9th November 1799...
    Date::Convert::French_Rev->convert($date);
    print $date->date_string, "\n";                     # ... is "18 Brumaire VIII"
    my $format = "%A %d %B %EY %Ej";
    print $date->date_string($format), "\n";            # ... or "Octidi 18 Brumaire VIII jour de la dentelaire"

Converting from Revolutionary to Gregorian (or other)

    $date = Date::Convert::French_Rev->new(8, 2, 18);   # 18 Brumaire VIII...
    Date::Convert::Gregorian->convert($date);
    print $date->date_string, "\n";                     # ... is "1799 Nov 9"

Alternate way of converting from Revolutionary to Gregorian (or other)

    $date = Date::Convert::French_Rev->new(8, 2, 18);   # 18 Brumaire VIII...
    $date->change_to("Date::Convert::Gregorian");
    print $date->date_string, "\n";                     # ... is "1799 Nov 9"

REQUIRES

Date::Convert, Roman

A Unicode-friendly version of Perl, that is, more or less, Perl 5.8.8 or greater. Yet, if you do not use the date_string accessor, you can use a lower version of Perl.

EXPORTS

Nothing.

DESCRIPTION

The following methods are available:

new

Create a new Revolutionary date object with the specified year, month, day parameters, e.g.

  $date = Date::Convert::French_Rev->new(8, 2, 18)

for 18 Brumaire VIII.

date

Extract a list consisting of the year, the month and the day. The end-of-year additional days are assigned to the virtual 13th month.

year

Return just the year element of date.

month

Return the month element of date, or 13 if the date is an additional day at the end of the year.

day

Return just the day number element of date.

is_leap

Boolean.

convert

Change the date to a new format. The invocant is the class name of the destination calendar, the parameter is the Date::Convert::whatever object to convert.

change_to

Change the date to a new format. The invocant is the Date::Convert::whatever object to convert, the parameter is the class name of the destination calendar. For the moment, this method is available only for Date::Convert::French_Rev invocant objects.

date_string

Return the date in a pretty format. You can give an string parameter to adjust the date format to your preferences.

The format parameter to date_string is a string consisting of any characters (letters, digits, whitespace, other) with %-prefixed field descriptors, inspired from the Unix standard date(1) command.

The following field descriptors are recognized:

%y

2-digit year - 00 to 99

%Y, %G

year - 0001 to 9999. There is no difference between these three variants. This is because in the Revolutionary calendar, the beginning of a year is always aligned with the beginning of a décade, while in the Gregorian calendar, the beginning of a year is usually not aligned with the beginning of a week.

%L

This is a third specifier for the year. The problem is that I have forgotten why I have implemented this specifier. There are plenty of strftime-like libraries visible on the Internet, none of them has a %L specifier for the year. So where does it come from?

I will deprecate this speficier in the next module releases. For the next two years, it will function as previously. In the release after this 2-year delay, the %L specifier will produce a warning. And after another 2-year delay it will be removed.

%EY, %Ey

year as a Roman number - I to MMM

%m

month of year - 01 to 12, or 13 for the end-of-year additional days. The number is formatted as a 2-char string, with a leading zero if necessary.

%f

month of year - " 1" to "12", or "13" for the end-of-year additional days. The number is formatted as a 2-char string, with a leading space if necessary.

%b, %h

month abbreviation - Ven to Fru, or S-C for the end-of-year additional days (called Sans-Culottides). A 3-char string.

%B

month full name - Vendémiaire to Fructidor, or "jour complémentaire" for the end-of-year additional days. A variable length string.

%d

day of month - 01 to 30. The number is formatted as a 2-char string, with a leading zero if necessary.

%e

day of month - " 1" to "30". The number is formatted as a 2-char string, with a leading space if necessary.

%A

day of décade - "Primidi" to "Décadi". A variable length string.

%a

abbreviated day of décade - "Pri" to "Déc". A 3-char string. Beware: do not confuse Sep, Oct and Déc with Gregorian calendar months

%w

day of décade - " 1" to "10" (" 1" for Primidi, " 2" for Duodi, etc). The number is formatted as a 2-char string, with a leading space if necessary.

%j

day of the year - "001" to "366". A 3-char string, with leading zeroes if necessary.

%Ej

full name of the day of the year. Instead of assigning a saint to each day, the creators of the calendar decided to assign a plant, an animal or a tool. A variable-length string.

%EJ

same as %Ej, but significant words are capitalized.

%*

same as %Ej.

%Oj

simple name of the day of the year. Same as %Ej, without the prefix.

%n, %t, %%, %+

replaced by a newline, tab, percent and plus character respectively.

The time-related field specifiers are irrelevant. Therefore, they are copied "as is" into the result string. These fields are:

  %H, %k, %i, %I, %p, %M, %S, %s, %o, %Z, %z

Neither are the composite field specifiers supported:

  %c, %C, %u, %g, %D, %x, %l, %r, %R, %T, %X, %V, %Q, %q, %P, %F, %J, %K

If a percent-sequence is not a valid specifier, it is copied "as is" into the result string. This is true especially for %E-sequences and %O-sequences other than those listed above.

DIAGNOSTICS

year %s out of range

The module does not deal with year prior to the epoch. The year must be "1" or greater.

month %s out of range

The French Revolutionary calendar has 12 months, plus 5 or 6 additional days that do not belong to a month. So the month number must be in the 1-12 range for normal days, or 13 for additional days

standard day number %s out of range

The day number for any normal month is in the 1-30 range.

additional day %s out of range

The day number for the end-of-year additional days is a number in the 1-5 range (or the 1-6 range for leap years).

Date::Convert::French_Rev::initialize needs more args

You must provide a year, a month number and a day number to Date::Convert::French_Rev::initialize.

KNOWN BUGS AND CAVEATS

Not many bugs, but many caveats.

My sources disagree about the 4th additional day. One says "jour de l'opinion", the other says "jour de la raison".

Another disagreement is that some sources ignore the Romme rule, and use only the equinox rule. So, a 1- or 2-day difference can happen.

This module inherits its user interface from Mordechai Abzug's Date::Convert, which is, according to its author, "in pre-alpha state". Therefore, my module's user interface is also subject to changes.

I have checked the manpage for date(1) in two flavors of Unix: Linux and AIX. In the best case, the extended field descriptors %Ex and %Oy are poorly documented, but usually they are not documented.

The Test::Exception and Test::Warning modules are required for the build process, not for the regular use of Date::Convert::French_Rev.

You should not use the %L strftime specifier. For the moment it prints the year, but in some next release, about in Vendémiaire 231 (that is, September 2022) it will produce a warning. And after another two years it will be removed.

HISTORICAL NOTES

The Revolutionary calendar was in use in France from 24 November 1793 (4 Frimaire II) to 31 December 1805 (10 Nivôse XIV). An attempt to use the decimal rule (the basis of the metric system) to the calendar. Therefore, the week disappeared, replaced by the décade (10 days, totally different from the English word "decade", 10 years). In addition, all months have exactly 3 decades, no more, no less.

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 the symbol of 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.

In his book The French Revolution, the 19th century writer Thomas Carlyle proposes these translations for the month names:

  Vendémiaire -> Vintagearious
  Brumaire    -> Fogarious
  Frimaire    -> Frostarious
  Nivôse      -> Snowous
  Pluviôse    -> Rainous
  Ventôse     -> Windous
  Germinal    -> Buddal
  Floréal     -> Floweral
  Prairial    -> Meadowal
  Messidor    -> Reapidor
  Thermidor   -> Heatidor
  Fructidor   -> Fruitidor

AUTHOR

Jean Forget <JFORGET@cpan.org>

based on Mordechai T. Abzug's work <morty@umbc.edu>

with thanks to Gérald Sédrati-Dinet (GIBUS at cpan dot org), for his thorough documentation research.

SEE ALSO

Perl Software

perl(1), Date::Convert

DateTime

DateTime::Calendar::FrenchRevolutionary or https://github.com/jforget/DateTime-Calendar-FrenchRevolutionary

Date::Converter

Other Software

date(1)

CALENDRICA 4.0 -- Common Lisp, which can be download in the "Resources" section of https://www.cambridge.org/us/academic/subjects/computer-science/computing-general-interest/calendrical-calculations-ultimate-edition-4th-edition?format=PB&isbn=9781107683167

calendar/cal-french.el in emacs-21.2 or later or xemacs 21.1.8, forked in https://github.com/jforget/emacs-lisp-cal-french

Date::Calendar::FrenchRevolutionary for Raku at https://modules.raku.org/dist/Date::Calendar::FrenchRevolutionary:cpan:JFORGET or https://github.com/jforget/raku-Date-Calendar-FrenchRevolutionary

https://www.gnu.org/software/apl/Bits_and_Pieces/calfr.apl.html or https://github.com/jforget/apl-calendar-french

https://www.hpcalc.org/details/7309 or https://github.com/jforget/hp48-hp50-French-Revolutionary-calendar

https://github.com/jforget/hp41-calfr

French Calendar for Android at https://f-droid.org/packages/ca.rmen.android.frenchcalendar/ or https://github.com/caarmen/FRCAndroidWidget and https://github.com/caarmen/french-revolutionary-calendar

Thermidor for Android at https://github.com/jhbadger/Thermidor-Android

A Ruby program at https://github.com/jhbadger/FrenchRevCal-ruby

books

Quid 2001, M and D Frémy, publ. Robert Laffont

Agenda Républicain 197 (1988/89), publ. Syros Alternatives

Any French schoolbook about the French Revolution

The French Revolution, Thomas Carlyle, Oxford University Press

Internet

http://www.faqs.org/faqs/calendars/faq/part3/

https://h2g2.com/approved_entry/A2903636

https://www.allhotelscalifornia.com/kokogiakcom/frc/default.asp

https://en.wikipedia.org/wiki/French_Republican_Calendar

https://fr.wikipedia.org/wiki/Calendrier_républicain

http://prairial.free.fr/index.php?lien=cal_sommaireFR (in French)

https://archive.org/details/decretdelaconven00fran_40

"Décret du 4 frimaire, an II (24 novembre 1793) sur l'ère, le commencement et l'organisation de l'année et sur les noms des jours et des mois"

https://archive.org/details/decretdelaconven00fran_41

Same text, with a slightly different typography.

https://purl.stanford.edu/dx068ky1531

"Archives parlementaires de 1789 à 1860: recueil complet des débats législatifs & politiques des Chambres françaises", J. Madival and E. Laurent, et. al., eds, Librairie administrative de P. Dupont, Paris, 1912.

Starting with page 6, this document includes the same text as the previous links, with a much improved typography. Especially, all the "long s" letters have been replaced by short s. Also interesting is the text following the decree, page 21 and following: "Annuaire ou calendrier pour la seconde année de la République française, annexe du décret du 4 frimaire, an II (24 novembre 1793) sur l'ère, le commencement et l'organisation de l'année et sur les noms des jours et des mois". In the remarks above, it is refered as [Annexe].

https://gallica.bnf.fr/ark:/12148/bpt6k48746z

[Fabre] "Rapport fait à la Convention nationale dans la séance du 3 du second mois de la seconde année de la République française, au nom de la Commission chargée de la confection du calendrier", Philippe-François-Nazaire Fabre d'Églantine, Imprimerie nationale, Paris, 1793

https://gallica.bnf.fr/ark:/12148/bpt6k49016b

[Annuaire] "Annuaire du cultivateur, pour la troisième année de la République : présenté le 30 pluviôse de l'an II à la Convention nationale, qui en a décrété l'impression et l'envoi, pour servir aux écoles de la République", Gilbert Romme, Imprimerie nationale des lois, Paris, 1794-1795

https://gallica.bnf.fr/ark:/12148/bpt6k43978x

"Calendrier militaire, ou tableau sommaire des victoires remportées par les Armées de la République française, depuis sa fondation (22 septembre 1792), jusqu'au 9 floréal an 7, époque de la rupture du Congrès de Rastadt et de la reprise des hostilités" Moutardier, Paris, An VIII de la République française. The source of the on_date method.

LICENSE

Copyright (c) 2001, 2002, 2003, 2013, 2015, 2020 Jean Forget. All rights reserved. This program is free software. You can distribute, modify, and otherwise mangle Date::Convert::French_Rev under the same terms as Perl 5.16.3: GNU Public License version 1 or later and Perl Artistic License

You can find the text of the licenses in the LICENSE file or at https://dev.perl.org/licenses/artistic.html and https://www.gnu.org/licenses/gpl-1.0.html.

Here is the summary of GPL:

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, see <https://www.gnu.org/licenses/> or write to the Free Software Foundation, Inc., https://www.fsf.org.