NAME
DateTime::Calendar::FrenchRevolutionary - Dates in the French Revolutionary Calendar
SYNOPSIS
use DateTime::Calendar::FrenchRevolutionary;
$dt = DateTime::Calendar::FrenchRevolutionary->new( year => 8,
month => 2,
day => 18,
);
# convert FrenchRevolutionary->Gregorian...
$dtgreg = DateTime->from_object( object => $dt );
# ... and back again
$dtrev = DateTime::Calendar::FrenchRevolutionary->from_object( object => $dtgreg );
DESCRIPTION
DateTime::Calendar::FrenchRevolutionary implements the French Revolutionary Calendar. This module implements most methods of DateTime; see the DateTime(3) manpage for all methods.
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 apply 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 XIXth 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
There was also an attempt to decimalize the day's subunits, with 1 day = 10 hours, 1 hour = 100 minutes and 1 minute = 100 seconds. But this reform was put on hold after two years or so and it never reappeared.
METHODS
Since the week has been replaced by the décade, the corresponding method names still are decade_number
, day_of_decade
, etc. English speakers, please note that this has nothing to do with a 10-year period.
The module supports both Anglo-Babylonian time and decimal time. The accessors for ABT are abt_hour
, abt_minute
, abt_second
and abt_hms
, the accessors for decimal time are hour
, minute
, second
and hms
. The strftime
and iso8601
methods use only decimal time. The ABT accessors are provided to be historically correct, since the decimal time reform was never put in force. Yet, emphasis is on decimal time because it is more fun than sexagesimal time, which anyhow can be obtained with the standard Gregorian DateTime.pm
module.
Constructors
new(...)
Creates a new date object.
from_epoch( epoch => $epoch )
Creates a date object from a timestamp value. This timestamp is the number of seconds since the computer epoch, not the calendar epoch.
now( )
Creates a date object that corresponds to the precise instant the method is called.
from_object( object => $object, ... )
Creates a date object by converting another object from the DateTime suite. The preferred way for calendar to calendar conversion.
last_day_of_month( ... )
Not tested
clone
Not tested
Accessors
year
Returns the year
month
Returns the month in the 1..12 range. If the date is an additional day at the end of the year, returns 13, which is not really a month number.
month_0
Returns the month in the 0..11 range. If the date is an additional day at the end of the year, returns 12, which is not really a month number.
month_name
Returns the French name of the month. No other language is supported. For the additional days at the end of the year, returns "jour complémentaire", the translation of "additional day".
month_abbr
Returns a 3-letter abbreviation of the month name. For the additional days at the end of the year, returns "S-C", because these additional days were also known as the Sans-culottides.
day_of_month, day, mday
Returns the day of the month, from 1..30.
day_of_decade, dod
Returns the day of the decade, from 1..10.
day_name
Returns the name of the current day of the décade.
day_abbr
Returns the abbreviated name of the current day of the décade.
day_of_year, doy
Returns the day of the year.
feast, feast_short, feast_long, feast_caps
Returns the plant, animal, mineral or tool associated with the day. The default format is
short
. If requested, you can ask for thelong
format, with ajour de...
prefix, or thecaps
format, with the first letter of the prefix and feast capitalized. Example: for 11 Vendémiaire, we have:feast, feast_short pomme de terre feast_long jour de la pomme de terre feast_caps Jour de la Pomme de terre
ymd, dmy, mdy
Returns the date in the corresponding composite format. An optional parameter allows you to choose the separator between the date elements.
abt_hour, abt_minute, abt_min, abt_second, abt_sec
Return the corresponding time elements, using a sexagesimal scale. This is also known as the Anglo-Babylonian Time.
hour, minute, min, second, sec
Return the corresponding time elements, using a decimal scale, with 10 hours per day, 100 minutes per hour and 100 seconds per minute.
abt_hms
Returns a composite string with the three time elements. Uses the Anglo-Babylonian Time. An optional parameter allows you to choose the separator (
:
by default).hms
Returns a composite string with the three time elements. Uses the decimal time. An optional parameter allows you to choose the separator (
:
by default).iso8601
Returns the date and time is a format similar to what ISO-8601 has specified for the Gregorian calendar.
is_leap_year
Returns a true value if the year is a leap year, false else.
decade, decade_number
Returns the décade number. Note: since the décades are aligned with the years, there is no need for a method giving the year of the week... er I mean décade. So the methods
decade
anddecade_number
are synonymous. Especially, thedecade
method returns a scalar, not a 2-element list.utc_rd_values
Returns the current UTC Rata Die days and seconds as a two element list. This exists primarily to allow other calendar modules to create objects based on the values provided by this object.
jd, mjd
These return the Julian Day and Modified Julian Day, respectively. The value returned is a floating point number. The fractional portion of the number represents the time portion of the datetime.
utc_rd_as_seconds
Returns the current UTC Rata Die days and seconds purely as seconds. This is useful when you need a single number to represent a date.
local_rd_as_seconds
Returns the current local Rata Die days and seconds purely as seconds.
strftime( $format, ... )
This method implements functionality similar to the
strftime()
method in C. However, if given multiple format strings, then it will return multiple elements, one for each format string.See the strftime Specifiers section for a list of all possible format specifiers.
epoch
Return the UTC epoch value for the datetime object. Internally, this is implemented using
Time::Local
, which uses the Unix epoch even on machines with a different epoch (such as Mac OS). Datetimes before the start of the epoch will be returned as a negative number.Since epoch times cannot represent many dates on most platforms, this method may simply return undef in some cases.
Using your system's epoch time may be error-prone, since epoch times have such a limited range on 32-bit machines. Additionally, the fact that different operating systems have different epoch beginnings is another source of bugs.
ce_jour, on_date
Gives a few historical events that took place on the same date (day+month). These events occur during the period of use of the calendar, that is, no later than Gregorian year 1805. The related events either were located in France, or were battles in which a French army was involved.
Depending on which method you choose, the text is either French or English.
Not all eligible events are portrayed there. The events database will be expanded in future versions.
strftime Specifiers
The following specifiers are allowed in the format string given to the strftime()
method:
%a
The abbreviated day of decade name.
%A
The full day of decade name.
%b
The abbreviated month name, or 'S-C' for additional days (abbreviation of Sans-culottide, another name for these days).
%B
The full month name.
%C
The century number (year/100) as a 2-digit integer.
%d
The day of the month as a decimal number (range 01 to 30).
%D
Equivalent to %m/%d/%y. This is not a good standard format if you have want both Americans and Europeans to understand the date!
%e
Like %d, the day of the month as a decimal number, but a leading zero is replaced by a space.
%F
Equivalent to %Y-%m-%d (the ISO 8601 date format)
%G
Strictly similar to
%Y
, since décades are aligned with the beginning of the year in this calendar.%g
Strictly similar to
%y
, since décades are aligned with the beginning of the year in this calendar.%h
Equivalent to %b.
%H
The hour as a decimal number using a 10-hour clock (range 0 to 9). The result is a single-char string.
%I
The hour as a decimal number using a 5-hour clock (range 0 to 4). Since decimal time was never actually used, we do not know whether the people would have split a day in two halves. This format is provided by analogy with the usage of sexagesimal time in the Gregorian calendar.
%j
The day of the year as a decimal number (range 001 to 366).
%k
The hour (10-hour clock) as a decimal number (range 0 to 9); the result is a 2-char string, the digit is preceded by a blank. (See also %H.)
%l
The hour (5-hour clock) as a decimal number (range 1 to 4); the result is a 2-char string, the digit is preceded by a blank. (See also %I.)
%m
The month as a decimal number (range 01 to 12).
%M
The minute as a decimal number (range 00 to 99).
%n
A newline character.
%p
Either `AM' or `PM' according to the given time value, or the corresponding strings for the current locale. Noon is treated as `pm' and midnight as `am'.
%P
Like %p but in lowercase: `am' or `pm' or a corresponding string for the current locale.
%r
The decimal time in a.m. or p.m. notation. In the POSIX locale this is equivalent to `%I:%M:%S %p'.
%R
The decimal time in 10-hour notation (%H:%M). (SU) For a version including the seconds, see %T below.
%s
The number of seconds since the epoch.
%S
The second as a decimal number (range 00 to 99).
%t
A tab character.
%T
The decimal time in 10-hour notation (%H:%M:%S).
%u
The day of the décade as a decimal, range 1 to 10, Primidi being 1. See also %w.
%U
The décade number of the current year as a decimal number, range 00 to 31.
%V
to be adapted to FR calendar. The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week. See also %U and %W.
%w
The day of the décade as a decimal, range 0 to 9, Décadi being 0. See also %u.
%W
The décade number of the current year as a decimal number, range 00 to 31.
%y
The year as a decimal number without a century (range 00 to 99).
%Y
The year as a decimal number including the century.
%Ey
The year as a lowercase Roman number.
%EY
The year as a uppercase Roman number, which is the traditional way to write years when using the French Revolutionary calendar.
%z
The time-zone as hour offset from UTC. Required to emit RFC822-conformant dates (using "%a, %d %b %Y %H:%M:%S %z"). Since the module does not support time zones, this gives silly results and you cannot be RFC822-conformant. Anyway, RFC822 requires the Gregorian calendar, doesn't it?
%Z
The time zone or name or abbreviation, should the module have supported them.
%%
A literal `%' character.
REMARKS
Time Zones
Only the floating time zone is supported. Time zones were created in the late XIXth century, at a time when instant communication (electric telegraph) made it necessary. But at this time, the French Revolutionary calendar was no longer in use.
Leap Seconds
They are not supported.
I18N
Like Henry Ford would have said, you can choose any language, provided you choose French.
There is an exception: the method ce_jour
has an English-speaking twin, on_date
.
SUPPORT
Support for this module is provided via the datetime@perl.org email list. See http://lists.perl.org/ for more details.
AUTHOR
Jean Forget <JFORGET@cpan.org>
based on Dave Rolsky's DateTime module, Eugene van der Pijll's DateTime::Calendar::Pataphysical module and my prior Date::Convert::French_Rev module.
The development of this module is hosted by Les Mongueurs de Perl, http://www.mongueurs.net/.
SEE ALSO
Software
date(1), perl(1), DateTime(3), DateTime::Calendar::Pataphysical(3), Date::Convert::French_Rev
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://datetime.perl.org/
http://www.faqs.org/faqs/calendars/faq/part3/
http://zapatopi.net/metrictime.html
LICENSE STUFF
Copyright (c) 2003 Jean Forget. All rights reserved. This program is free software. You can distribute, modify, and otherwise mangle DateTime::Calendar::FrenchRevolutionary under the same terms as perl.
10 POD Errors
The following errors were encountered while parsing the POD:
- Around line 832:
Non-ASCII character seen before =encoding in 'Nivôse'. Assuming CP1252
- Around line 994:
Expected '=item *'
- Around line 999:
Expected '=item *'
- Around line 1004:
Expected '=item *'
- Around line 1009:
Expected '=item *'
- Around line 1015:
Expected '=item *'
- Around line 1021:
Expected '=item *'
- Around line 1026:
Expected '=item *'
- Around line 1030:
Expected '=item *'
- Around line 1293:
You forgot a '=back' before '=head1'