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=new Date::Convert::Gregorian(1799, 11, 9);
convert Date::Convert::French_Rev $date;
print $date->date_string, "\n";
print $date->date_string($format), "\n";
Converting from Revolutionary to Gregorian (or other)
$date=new Date::Convert::French_Rev(8, 2, 18);
convert Date::Convert::Gregorian $date;
print $date->date_string, "\n";
REQUIRES
Date::Convert, Roman
EXPORTS
Nothing.
DESCRIPTION
The following methods are available:
- new
-
Create a new Revolutinary date object with the specified start parameters, ie.
$date = new Date::Convert::French_Rev(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
-
Just like year and month.
- is_leap
-
Boolean.
- convert
-
Change the date to a new format.
- 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
-
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
- %m
-
month of year - 01 to 12, or 13 for the end-of-year additional days.
- %f
-
month of year - " 1" to "12", or "13" for the end-of-year additional days.
- %b, %h
-
month abbreviation - Ven to Fru, or S-C for the end-of-year additional days (called Sans-Culottides).
- %B
-
month full name - Vendémiaire to Fructidor, or "jour complémentaire" for the end-of-year additional days.
- %d
-
day of month - 01 to 30
- %e
-
day of month - " 1" to "30"
- %A
-
day of décade - "Primidi" to "Décadi". This value is irrelevant for additional days, therefore the field descriptor is replaced by the empty string.
- %a
-
abbreviated day of décade - "Pri" to "Déc". This value is irrelevant for additional days, therefore the field descriptor is replaced by a blank 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) This value is irrelevant for additional days, therefore the field descriptor is replaced by a blank string.
- %j
-
day of the year - "001" to "366".
- %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.
- %EJ
-
same as %Ej, but significant words are capitalized.
- %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
DIAGNOSTICS
These are the diagnostics which can be produced by Date::Convert::French_Rev
. The explanations can be displayed when the error is produced if you have installed diagnostics.pm
, version 1.2. Just insert one of the following lines in your script:
use diagnostics qw(-m=Date::Convert::French_Rev);
use diagnostics qw(-m=Date::Convert::French_Rev -m=perl);
- 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
- 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
. - standard day number %s out of range
-
The day number for any normal month is in the 1-30 range.
- These routines don't work well for French_Rev before year 1
-
If you ask a negative (Revolutionary) year, zero included, the module may produce various errors, such as off-by-one conditions.
KNOWN BUGS AND CAVEATS
Not many bugs, but many caveats.
Some day names correspond to little known plants. Therefore, I am not sure if they use the masculine gender or the feminine gender. I have found some in various dictionaries, but there still remain a few of them. Note: they are tagged with a 4, 5 or 6 code.
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 check 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.
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 <J-FORGET@wanadoo.fr>
based on Mordechai T. Abzug's work <morty@umbc.edu>
The development of this module is hosted by Les Mongueurs de Perl, http://www.mongueurs.net.
SEE ALSO
Software
date(1), perl(1), Date::DateCalc(3), Date::Convert(3)
calendar/cal-french.el in emacs-21.2 or xemacs 21.1.8
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/
LICENSE STUFF
Copyright (c) 2001, 2002 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.
3 POD Errors
The following errors were encountered while parsing the POD:
- Around line 482:
Non-ASCII character seen before =encoding in 'décade,'. Assuming CP1252
- Around line 583:
'=item' outside of any '=over'
- Around line 612:
You forgot a '=back' before '=head1'