- KNOWN BUGS AND CAVEATS
- HISTORICAL NOTES
- SEE ALSO
Date::Convert::French_Rev - Convert from / to French Revolutionary Calendar
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"
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.
The following methods are available:
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.
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.
Return just the year element of date.
Return the month element of date, or 13 if the date is an additional day at the end of the year.
Return just the day number element of date.
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 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
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
The following field descriptors are recognized:
2-digit year - 00 to 99
- %Y, %G, %L
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.
- %EY, %Ey
year as a Roman number - I to MMM
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.
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.
month full name - Vendémiaire to Fructidor, or "jour complémentaire" for the end-of-year additional days. A variable length string.
day of month - 01 to 30. The number is formatted as a 2-char string, with a leading zero if necessary.
day of month - " 1" to "30". The number is formatted as a 2-char string, with a leading space if necessary.
day of décade - "Primidi" to "Décadi". A variable length string.
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
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.
day of the year - "001" to "366". A 3-char string, with leading zeroes if necessary.
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.
same as %Ej, but significant words are capitalized.
same as %Ej.
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
%O-sequences other than those listed above.
- 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
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
%Oy are poorly documented, but usually they are not documented.
Test::Exception module is required for the build process, not for the regular use of
Date::Convert::French_Rev. But with
ExtUtils::MakeMaker, I do not know how to generate a
build_requires entry in META.yml.
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
Jean Forget <JFORGET@cpan.org>
based on Mordechai T. Abzug's work <firstname.lastname@example.org>
date(1), perl(1), Date::Convert
calendar/cal-french.el in emacs or xemacs
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
Copyright (c) 2001, 2002, 2003, 2013, 2015 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 http://www.perlfoundation.org/artistic_license_1_0 and http://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, write to the Free Software Foundation, Inc., <http://www.fsf.org/>.