DateTime-Calendar-FrenchRevolutionary
view release on metacpan or search on metacpan
lib/DateTime/Calendar/FrenchRevolutionary/Locale/fr.pm view on Meta::CPAN
# -*- encoding: utf-8; indent-tabs-mode: nil -*-
#
# Perl DateTime extension for providing French strings for the French Revolutionary calendar
# Copyright (c) 2003, 2004, 2010, 2011, 2014, 2016, 2019, 2021 Jean Forget. All rights reserved.
#
# See the license in the embedded documentation below.
#
package DateTime::Calendar::FrenchRevolutionary::Locale::fr;
use utf8;
use strict;
use warnings;
use vars qw($VERSION);
$VERSION = '0.17'; # same as parent module DT::C::FR
my @months_short = qw (Vnd Bru Fri Niv Plu Vnt Ger Flo Pra Mes The Fru S-C);
#my @add_days_short= qw (Vertu Génie Trav Raison Récomp Révol);
my @months = qw(Vendémiaire Brumaire Frimaire
Nivôse Pluviôse Ventôse
Germinal Floréal Prairial
Messidor Thermidor Fructidor);
push @months, "jour complémentaire";
my @decade_days = qw (Primidi Duodi Tridi Quartidi Quintidi Sextidi Septidi Octidi Nonidi Décadi);
my @decade_days_short = qw (Pri Duo Tri Qua Qui Sex Sep Oct Non Déc);
my @am_pms = qw(AM PM);
my $date_before_time = "1";
my $default_date_format_length = "medium";
my $default_time_format_length = "medium";
my $date_parts_order = "dmy";
my %date_formats = (
"short" => "\%d\/\%m\/\%Y",
"medium" => "\%a\ \%d\ \%b\ \%Y",
"long" => "\%A\ \%d\ \%B\ \%EY",
"full" => "\%A\ \%d\ \%B\ \%EY\,\ \%{feast_long\}",
);
my %time_formats = (
"short" => "\%H\:\%M",
"medium" => "\%H\:\%M\:\%S",
"long" => "\%H\:\%M\:\%S",
"full" => "\%H\ h\ \%M\ mn \%S\ s",
);
# When initializing an array with lists within lists, it means one of two things:
# Either it is a newbie who does not know how to make multi-dimensional arrays,
# Or it is a (at least mildly) experienced Perl-coder who, for some reason,
# wants to initialize a flat array with the concatenation of lists.
# I am a (at least mildly) experienced programmer who wants to use qw() and yet insert
# comments in some places.
my @feast = (
# Vendémiaire
qw(
0raisin 0safran 1châtaigne 1colchique 0cheval
1balsamine 1carotte 2amaranthe 0panais 1cuve
1pomme_de_terre 2immortelle 0potiron 0réséda 2âne
1belle-de-nuit 1citrouille 0sarrasin 0tournesol 0pressoir
0chanvre 1pêche 0navet 2amarillis 0bÅuf
lib/DateTime/Calendar/FrenchRevolutionary/Locale/fr.pm view on Meta::CPAN
1302
2 jour complémentaire I Armée des Pyrénées orientales. Les Français
se rendent maîtres de Sterry.
2 jour complémentaire II Armée de Sambre et Meuse. Victoire remportée
par toute la ligne de l'armée française, depuis Maseick jusqu'Ã
Sprimont.
Prise de Lauwfeld, d'Emale et de Montenack ; passage de l'Ourte et de
Laywale.
2 jour complémentaire IV Armée de Rhin et Moselle. Attaque
infructueuse du fort de Kehl par l'ennemi.
1303
3 jour complémentaire III Armée de Sambre et Meuse. Combat sur la
Lahn ; prise de Limbourg, Dietz et Nasseau.
Armée d'Italie. Combat sur la ligne de Borghetto ; défaite des
Autrichiens.
3 jour complémentaire V Mort du général Hoche, général en chef de
l'armée de Sambre et Meuse.
1304
4 jour complémentaire I Armée des Pyrénées occidentales. Prise de
Villefranche et du camp de Prades.
Prise d'Escalo et d'Uaborsy, occupés par les Espagnols.
4 jour complémentaire II Armée de Sambre et Meuse. Enlèvement de vive
force des hauteurs de Clermont, après sept attaques successives.
Armée d'Italie. Victoire du Cairo sur les Piémontais, soutenus par
dix mille Autrichiens.
4 jour complémentaire III Reddition de Manheim par capitulation.
1305
5 jour complémentaire II Armée des Pyrénées occidentales. Déroute des
Espagnols au Mont-Roch.
5 jour complémentaire IV Mort du général Marceau, âgé de 27 ans, tué Ã
Altenkirchen par un coup de carabine.
EVENTS
delete $event{dummy};
}
# A module must return a true value. Traditionally, a module returns 1.
# But this module is a revolutionary one, so it discards all old traditions.
"Dansons la carmagnole, vive le son du canon.";
__END__
=encoding utf8
=head1 NAME
DateTime::Calendar::FrenchRevolutionary::Locale::fr -- French localization for the French
revolutionary calendar.
=head1 SYNOPSIS
use DateTime::Calendar::FrenchRevolutionary::Locale;
my $french_locale = DateTime::Calendar::FrenchRevolutionary::Locale->load('fr');
my $french_month_name =$french_locale->month_name($date);
=head1 DESCRIPTION
This module provides localization for DateTime::Calendar::FrenchRevolutionary.
Usually, its methods will be invoked only from DT::C::FR.
=head1 USAGE
This module provides the following class methods:
=over 4
=item * new
Returns an object instance, which is just a convenient value to be
stored in a variable.
Contrary to the widely used Gregorian calendar, there is no need to
customize a French Revolutionary calendar locale. Therefore, there are
no instance data and no instance methods.
=item * month_name ($date)
Returns the French name for C<$date>'s month, where C<$date> is a
C<DateTime::Calendar::FrenchRevolutionary> object.
=item * month_abbreviation ($date)
Returns a 3-letter abbreviation for the French month name.
=item * day_name ($date)
Returns the French day name.
=item * day_abbreviation ($date)
Returns a 3-letter abbreviation for the French day name.
=item * am_pm ($date)
Returns a code (typically C<AM> or C<PM>) showing whether the datetime
is in the morning or the afternoon. Outside the sexagesimal time with
a 1..12 hour range, this is not very useful.
=item * feast_short ($date)
Returns the name for the plant, animal or tool that correspond to
C<$date>'s feast.
=item * feast_long ($date)
Same as C<feast_short>, with a "jour" prefix.
=item * feast_caps ($date)
Same as C<feast_long> with capitalized first letters.
=item * on_date ($date)
Gives a small text about the events which occurred the same month and
day as C<$date> between the calendar's epoch (22 Sep 1792) and the day
it was rescinded (31 Dec 1805).
Most of these events come from an anonymous propaganda book published
in year VIII (1799--1800). The others are common knowledge available
in any French History book or any encyclopedia.
=item * full_date_format, long_date_format, medium_date_format, short_date_format
Class methods, giving four C<strftime> canned formats for dates,
without the need to remember all the C<%> specifiers.
=item * full_time_format, long_time_format, medium_time_format, short_time_format
Same thing, C<strftime> canned formats for decimal time.
=item * full_datetime_format, long_datetime_format, medium_datetime_format, short_datetime_format
Same thing, for formats including both the date and the decimal time.
=item * default_date_format, default_time_format, default_datetime_format
Class methods suggesting one each of the date formats, of the time
formats and of the datetime formats.
=item * full_time_format, long_time_format, medium_time_format, short_time_format
Same thing, C<strftime> canned formats for decimal time.
=item * full_datetime_format, long_datetime_format, medium_datetime_format, short_datetime_format
Same thing, for formats including both the date and the decimal time.
=item * default_date_format, default_time_format, default_datetime_format
Class methods suggesting one each of the date formats, of the time
formats and of the datetime formats.
=item * default_date_format_length, default_time_format_length
While C<default_date_format> and C<default_time_format> give the
actual default formats, with C<%> and all, these class methods give a
one-word description of the default formats: C<short>, C<medium>,
C<long> or C<full>.
=item * date_formats, time_formats
These class methods give a hashtable where the key is the length
(C<short>, C<medium>, C<long> and C<full>) and the value is the
corresponding format, complete with C<%> and specifiers.
=item * month_names, month_abbreviations, day_names, day_abbreviations
Class methods giving the whole array of month or day names or abbrevs,
not limited to the date implemented by the invocant.
=back
=head1 SUPPORT
Support for this module is provided via the datetime@perl.org email
( run in 0.742 second using v1.01-cache-2.11-cpan-364913b4093 )