@@ -2,7 +2,8 @@ use Module::Build;
Module::Build->new (module_name => 'DateTime::Calendar::FrenchRevolutionary'
, license => 'perl'
- , requires => { Roman => 1.22
+ , requires => { perl => '5.8.5'
+ , Roman => 1.22
, DateTime => 0.14
}
, abstract => 'This modules allows converting dates to or from the French Revolutionary calendar'
@@ -1,5 +1,13 @@
Revision history for Perl extension DateTime::Calendar::FrenchRevolutionary.
+0.12 Octidi 28 Frimaire CCXXIII, jour de la Truffe (also known as Thursday 2014-12-18)
+ - add the GPL-mandated comments in all Perl code files
+ - fix RT ticket 100311: produce real UTF-8 strings, instead of Mojibake ISO-8859 which
+ will accidently display in a UTF-8 terminal as a proper string.
+ - playing the CPANTS game (when appropriate): use strict and use warnings in all Perl code
+ - improve coverage in tests (and remove some dead code)
+ - fix RT ticket 61228: check the various localized strings (feasts and "on_date")
+
0.11 Octidi 18 Brumaire CCXXI, jour de la dentelaire, 213th anniversary of Bonaparte's coup (also known as Thursday 2012-11-08)
- French locale: replacing the "4" and "5" "possible genre" indicators for feasts by "0"
or "1". The only indicator I am still not sure of is for "bagarade", but let us get rid
diff --git a/var/tmp/source/JFORGET/DateTime-Calendar-FrenchRevolutionary-0.11/DateTime-Calendar-FrenchRevolutionary-0.11/LICENSE b/var/tmp/source/JFORGET/DateTime-Calendar-FrenchRevolutionary-0.12/DateTime-Calendar-FrenchRevolutionary-0.12/LICENSE
old mode 100755
new mode 100644
@@ -42,5 +42,6 @@ t/55_locale.t
t/60_timezone.t
t/70_various.t
t/71_now.t
+t/72_utf8.t
t/80_neg.t
META.json
@@ -4,7 +4,7 @@
"Jean Forget <JFORGET@cpan.org>"
],
"dynamic_config" : 1,
- "generated_by" : "Module::Build version 0.4001, CPAN::Meta::Converter version 2.110930",
+ "generated_by" : "Module::Build version 0.4007, CPAN::Meta::Converter version 2.110440",
"license" : [
"perl_5"
],
@@ -22,26 +22,27 @@
"runtime" : {
"requires" : {
"DateTime" : "0.14",
- "Roman" : "1.22"
+ "Roman" : "1.22",
+ "perl" : "v5.8.5"
}
}
},
"provides" : {
"DateTime::Calendar::FrenchRevolutionary" : {
"file" : "lib/DateTime/Calendar/FrenchRevolutionary.pm",
- "version" : "0.11"
+ "version" : "0.12"
},
"DateTime::Calendar::FrenchRevolutionary::Locale" : {
"file" : "lib/DateTime/Calendar/FrenchRevolutionary/Locale.pm",
- "version" : "0.11"
+ "version" : "0.12"
},
"DateTime::Calendar::FrenchRevolutionary::Locale::en" : {
"file" : "lib/DateTime/Calendar/FrenchRevolutionary/Locale/en.pm",
- "version" : "0.11"
+ "version" : "0.12"
},
"DateTime::Calendar::FrenchRevolutionary::Locale::fr" : {
"file" : "lib/DateTime/Calendar/FrenchRevolutionary/Locale/fr.pm",
- "version" : "0.11"
+ "version" : "0.12"
}
},
"release_status" : "stable",
@@ -50,5 +51,5 @@
"http://dev.perl.org/licenses/"
]
},
- "version" : "0.11"
+ "version" : "0.12"
}
@@ -6,7 +6,7 @@ build_requires: {}
configure_requires:
Module::Build: 0.40
dynamic_config: 1
-generated_by: 'Module::Build version 0.4001, CPAN::Meta::Converter version 2.110930'
+generated_by: 'Module::Build version 0.4007, CPAN::Meta::Converter version 2.110440'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -15,19 +15,20 @@ name: DateTime-Calendar-FrenchRevolutionary
provides:
DateTime::Calendar::FrenchRevolutionary:
file: lib/DateTime/Calendar/FrenchRevolutionary.pm
- version: 0.11
+ version: 0.12
DateTime::Calendar::FrenchRevolutionary::Locale:
file: lib/DateTime/Calendar/FrenchRevolutionary/Locale.pm
- version: 0.11
+ version: 0.12
DateTime::Calendar::FrenchRevolutionary::Locale::en:
file: lib/DateTime/Calendar/FrenchRevolutionary/Locale/en.pm
- version: 0.11
+ version: 0.12
DateTime::Calendar::FrenchRevolutionary::Locale::fr:
file: lib/DateTime/Calendar/FrenchRevolutionary/Locale/fr.pm
- version: 0.11
+ version: 0.12
requires:
DateTime: 0.14
Roman: 1.22
+ perl: v5.8.5
resources:
license: http://dev.perl.org/licenses/
-version: 0.11
+version: 0.12
diff --git a/var/tmp/source/JFORGET/DateTime-Calendar-FrenchRevolutionary-0.11/DateTime-Calendar-FrenchRevolutionary-0.11/Makefile.PL b/var/tmp/source/JFORGET/DateTime-Calendar-FrenchRevolutionary-0.12/DateTime-Calendar-FrenchRevolutionary-0.12/Makefile.PL
old mode 100755
new mode 100644
@@ -1,8 +1,8 @@
-DateTime::Calendar::FrenchRevolutionary version 0.10
+DateTime::Calendar::FrenchRevolutionary version 0.12
====================================================
DateTime::Calendar::FrenchRevolutionary is copyright (c) 2003,
-2004, 2010, 2011, 2012 Jean Forget
+2004, 2010, 2011, 2012, 2014 Jean Forget
This is a companion module to DateTime.pm. It implements the French
@@ -57,7 +57,7 @@ That's all!
LICENSE INFORMATION
This module is free software; you can redistribute it and modify it
-under the same terms as Perl 5.12.2. For more details, see the full
+under the same terms as Perl 5.16.3. For more details, see the full
text of the licenses in the directory LICENSE.
This program is distributed in the hope that it will be useful, but it
diff --git a/var/tmp/source/JFORGET/DateTime-Calendar-FrenchRevolutionary-0.11/DateTime-Calendar-FrenchRevolutionary-0.11/TODO b/var/tmp/source/JFORGET/DateTime-Calendar-FrenchRevolutionary-0.12/DateTime-Calendar-FrenchRevolutionary-0.12/TODO
old mode 100755
new mode 100644
diff --git a/var/tmp/source/JFORGET/DateTime-Calendar-FrenchRevolutionary-0.11/DateTime-Calendar-FrenchRevolutionary-0.11/eg/README b/var/tmp/source/JFORGET/DateTime-Calendar-FrenchRevolutionary-0.12/DateTime-Calendar-FrenchRevolutionary-0.12/eg/README
old mode 100755
new mode 100644
@@ -1,7 +1,32 @@
-# Copyright (c) 2003, 2004, 2010, 2011 Jean Forget. All rights reserved.
#
-# Bistandard clock : Gregorian with 24x60x60 time,
-# French Revolionary with 10x100x100 time.
+# Example script for DateTime::Calendar::FrenchRevolutionary:
+# Bistandard clock : Gregorian with 24x60x60 time,
+# French Revolutionary with 10x100x100 time.
+#
+# Copyright (C) 2003, 2004, 2010, 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
#
use strict;
@@ -1,6 +1,13 @@
#!/usr/local/bin/perl -w
-# Copyright (c) 2003, 2004, 2010, 2011 Jean Forget. All rights reserved.
+#
+# Example script for DateTime::Calendar::FrenchRevolutionary:
+# print a few tables for an easy conversion of dates from Gregorian to French Revolutionary
+# Copyright (c) 2003, 2004, 2010, 2011, 2014 Jean Forget. All rights reserved.
+#
+# See the license in the embedded documentation below.
+#
+use utf8;
use strict;
use Getopt::Long;
use DateTime::Calendar::FrenchRevolutionary;
@@ -19,6 +26,8 @@ die "At least 5 columns" if $columns < 5;
die "The number of columns must be a multiple of 4 plus 1 (e.g. 5, 9 or 13)"
unless $columns % 4 == 1;
+binmode STDOUT, ':utf8';
+
--$columns; # because actually we do not want to be bothered with the heading column
# Because both the Gregorian leap day and the French Revolutionary leap
@@ -109,6 +118,7 @@ else
{ $ref_labels = do "$FindBin::Bin/labels_en" }
my %labels = %$ref_labels;
+html_0($labels{titleg2r});
html_1($labels{title1});
html_2($_) foreach (@parts);
print "<p>\n";
@@ -117,6 +127,7 @@ print "<p>\n";
print "<table><tr><td>\n" if $table_workaround;
usage($example);
print "</td></tr></table>\n" if $table_workaround;
+print "</body>\n</html>\n";
#
# Gives the letter for a year and a part
@@ -218,6 +229,19 @@ sub formulas {
@formulas;
}
+sub html_0 {
+ my ($title) = @_;
+ print <<"EOF";
+<html>
+<head>
+<title>$title</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+<body>
+<h1>$title</h1>
+EOF
+}
+
sub html_1 {
my ($title1) = @_;
print "<table border><tr><td></td><th align='center' colspan='$columns'>$title1</th></tr><tr align='right'><td></td>\n";
@@ -469,5 +493,36 @@ triggers this workaround.
Jean Forget <JFORGET@cpan.org>
+=head1 LICENSE STUFF
+
+Copyright (c) 2003, 2004, 2010, 2012, 2014 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 5.16.3.
+
+This program is distributed 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 F<LICENSE> file or at
+L<http://www.perlfoundation.org/artistic_license_1_0> and
+L<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, see <http://www.gnu.org/licenses/> or
+write to the Free Software Foundation, Inc., L<http://fsf.org>.
+
+=cut
@@ -1,6 +1,37 @@
#
+# English strings for the examples scripts of DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2003, 2004, 2010, 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
+#
# The labels hash, under an assumed name
#
+use utf8;
+use strict;
+use warnings;
+
my %labels =
( calendar => 'Calendar'
, month3 => [ qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec) ]
@@ -12,6 +43,8 @@ my %labels =
, title2 => { b => "Beginning of Year", m => "Middle of Year", e => "End of Year" }
, title3 => "Month names and day names"
, year_ttl => "Year"
+ , titleg2r => "Converting dates from Gregorian to French Revolutionary"
+ , titler2g => "Converting dates from French Revolutionary to Gregorian"
);
#
@@ -1,6 +1,36 @@
#
+# French strings for the examples scripts of DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2003, 2004, 2010, 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
# Le hachage des libellés
#
+use utf8;
+use strict;
+use warnings;
+
my %labels =
( calendar => 'Calendrier'
, month3 => [ qw(jan fév mars avr mai juin juil août sep oct nov déc) ]
@@ -12,6 +42,8 @@ my %labels =
, title2 => { b => "Début d'année", m => "Milieu d'année", e => "Fin d'année" }
, title3 => "Nom des mois et des jours"
, year_ttl => "Année"
+ , titleg2r => "Conversion de dates du calendrier grégorien vers le calendrier républicain"
+ , titler2g => "Conversion de dates du calendrier républicain vers le calendrier grégorien"
);
#
@@ -1,12 +1,16 @@
#!/usr/local/bin/perl -w
-# Copyright (c) 2003, 2004, 2010, 2011 Jean Forget. All rights reserved.
#
-# Printing a French Revolutionary calendar
+# Example script for DateTime::Calendar::FrenchRevolutionary:
+# print a French Revolutionary calendar
+# Copyright (c) 2003, 2004, 2010, 2011, 2014 Jean Forget. All rights reserved.
#
+# See the license in the embedded documentation below.
+#
+use utf8;
+use strict;
use DateTime::Calendar::FrenchRevolutionary;
use Getopt::Long;
use Roman;
-use strict;
use FindBin;
my $lang = 'en';
@@ -25,6 +29,8 @@ else {
}
my %labels = %$ref_labels;
+binmode STDOUT, ':utf8';
+
my $annee;
foreach $annee (@ARGV) {
warn "Invalid year", next if $annee <= 0;
@@ -193,6 +199,34 @@ each, but they are concatenated.
Jean Forget <JFORGET@cpan.org>
+=head1 LICENSE STUFF
+
+Copyright (c) 2003, 2004, 2010, 2012, 2014 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 5.16.3.
+
+This program is distributed 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 F<LICENSE> file or at
+L<http://www.perlfoundation.org/artistic_license_1_0> and
+L<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, see <http://www.gnu.org/licenses/> or
+write to the Free Software Foundation, Inc., L<http://fsf.org>.
+=cut
@@ -1,6 +1,13 @@
#!/usr/local/bin/perl -w
-# Copyright (c) 2003, 2004, 2010, 2011 Jean Forget. All rights reserved.
+#
+# Example script for DateTime::Calendar::FrenchRevolutionary:
+# print a few tables for an easy conversion of date from French Revolutionary to Gregorian
+# Copyright (c) 2003, 2004, 2010, 2011, 2014 Jean Forget. All rights reserved.
+#
+# See the license in the embedded documentation below.
+#
+use utf8;
use strict;
use Getopt::Long;
use DateTime::Calendar::FrenchRevolutionary;
@@ -19,6 +26,8 @@ die "At least 5 colmuns" if $columns < 5;
die "The number of columns must be a multiple of 4 plus 1 (e.g. 5, 9 or 13)"
unless $columns % 4 == 1;
+binmode STDOUT, ':utf8';
+
--$columns; # because actually we do not want to be bothered with the heading column
# Because the Gregorian leap day may occur in the middle of a French
@@ -112,11 +121,13 @@ my @fr_month = qw (Vendémiaire Brumaire Frimaire Nivôse Pluviôse Ventôse
Germinal Floréal Prairial Messidor Thermidor Fructidor);
push @fr_month, "Sans-Culottides<br>$labels{add_days}";
+html_0($labels{titler2g});
html_1($labels{title1});
html_2($_) foreach (@parts);
print "<table><tr><td>\n" if $table_workaround;
usage($example);
print "</td></tr></table>\n" if $table_workaround;
+print "</body>\n</html>\n";
#
# Gives the letter for a year and a part
@@ -199,6 +210,19 @@ sub formulas {
@formulas;
}
+sub html_0 {
+ my ($title) = @_;
+ print <<"EOF";
+<html>
+<head>
+<title>$title</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+<body>
+<h1>$title</h1>
+EOF
+}
+
sub html_1 {
my ($title1) = @_;
print "<table border><tr><td></td><th align='center' colspan='$columns'>$title1</th></tr><tr align='right'><td></td>\n";
@@ -421,4 +445,35 @@ option triggers this workaround.
Jean Forget <JFORGET@cpan.org>
+=head1 LICENSE STUFF
+
+Copyright (c) 2003, 2004, 2010, 2012, 2014 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 5.16.3.
+
+This program is distributed 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 F<LICENSE> file or at
+L<http://www.perlfoundation.org/artistic_license_1_0> and
+L<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, see <http://www.gnu.org/licenses/> or
+write to the Free Software Foundation, Inc., L<http://fsf.org>.
+
+=cut
diff --git a/var/tmp/source/JFORGET/DateTime-Calendar-FrenchRevolutionary-0.11/DateTime-Calendar-FrenchRevolutionary-0.11/eg/result/cal220_en.html b/var/tmp/source/JFORGET/DateTime-Calendar-FrenchRevolutionary-0.12/DateTime-Calendar-FrenchRevolutionary-0.12/eg/result/cal220_en.html
old mode 100755
new mode 100644
diff --git a/var/tmp/source/JFORGET/DateTime-Calendar-FrenchRevolutionary-0.11/DateTime-Calendar-FrenchRevolutionary-0.11/eg/result/cal220_fr.html b/var/tmp/source/JFORGET/DateTime-Calendar-FrenchRevolutionary-0.12/DateTime-Calendar-FrenchRevolutionary-0.12/eg/result/cal220_fr.html
old mode 100755
new mode 100644
@@ -1,3 +1,10 @@
+<html>
+<head>
+<title>Converting dates from Gregorian to French Revolutionary</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+<body>
+<h1>Converting dates from Gregorian to French Revolutionary</h1>
<table border><tr><td></td><th align='center' colspan='8'>Year to letter</th></tr><tr align='right'><td></td>
<td> 0<br> 8<br>16<br>24<br>32<br>40<br>48<br>56<br>64<br>72<br>80<br>88<br>96</td>
<td> 1<br> 9<br>17<br>25<br>33<br>41<br>49<br>57<br>65<br>73<br>81<br>89<br>97</td>
@@ -181,3 +188,5 @@ until you have a result greater than or equal to 1.
with the corresponding year formula <em>Year - 1792</em>,
which gives you <strong>23 Fru 0007</strong>, or better
<strong>Tridi 23 Fructidor VII</strong>.
+</body>
+</html>
@@ -1,3 +1,10 @@
+<html>
+<head>
+<title>Conversion de dates du calendrier grégorien vers le calendrier républicain</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+<body>
+<h1>Conversion de dates du calendrier grégorien vers le calendrier républicain</h1>
<table border><tr><td></td><th align='center' colspan='8'>Lettres pour une année</th></tr><tr align='right'><td></td>
<td> 0<br> 8<br>16<br>24<br>32<br>40<br>48<br>56<br>64<br>72<br>80<br>88<br>96</td>
<td> 1<br> 9<br>17<br>25<br>33<br>41<br>49<br>57<br>65<br>73<br>81<br>89<br>97</td>
@@ -216,3 +223,5 @@ ce qui donne
<strong>23 Fru 0007</strong>,
ou mieux,
<strong>Tridi 23 Fructidor VII</strong>.
+</body>
+</html>
@@ -1,3 +1,10 @@
+<html>
+<head>
+<title>Converting dates from French Revolutionary to Gregorian</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+<body>
+<h1>Converting dates from French Revolutionary to Gregorian</h1>
<table border><tr><td></td><th align='center' colspan='8'>Year to letter</th></tr><tr align='right'><td></td>
<td> 0<br> 8<br>16<br>24<br>32<br>40<br>48<br>56<br>64<br>72<br>80<br>88<br>96</td>
<td> 1<br> 9<br>17<br>25<br>33<br>41<br>49<br>57<br>65<br>73<br>81<br>89<br>97</td>
@@ -165,3 +172,5 @@ since the French Revolutionary day number is
<strong>18</strong>,
you use <em>-9 Mar</em>, and you get
<strong>9 March 1800</strong>.
+</body>
+</html>
@@ -1,3 +1,10 @@
+<html>
+<head>
+<title>Conversion de dates du calendrier républicain vers le calendrier grégorien</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+<body>
+<h1>Conversion de dates du calendrier républicain vers le calendrier grégorien</h1>
<table border><tr><td></td><th align='center' colspan='8'>Lettres pour une année</th></tr><tr align='right'><td></td>
<td> 0<br> 8<br>16<br>24<br>32<br>40<br>48<br>56<br>64<br>72<br>80<br>88<br>96</td>
<td> 1<br> 9<br>17<br>25<br>33<br>41<br>49<br>57<br>65<br>73<br>81<br>89<br>97</td>
@@ -169,3 +176,5 @@ vous devrez utiliser la formule
<em>-9 mars</em>,
et vous obtiendrez
<strong>9 Mars 1800</strong>.
+</body>
+</html>
@@ -1,4 +1,34 @@
#!/usr/local/bin/perl -w
+#
+# Example script for DateTime::Calendar::FrenchRevolutionary:
+# display the current date in various calendars
+#
+# Copyright (C) 2003, 2004, 2010, 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
+
# Check the shebang line and then just call this script from your .profile
@@ -1,11 +1,19 @@
-# Copyright (c) 2003, 2004, 2010, 2011 Jean Forget. All rights reserved.
# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Perl DateTime extension for providing English strings for the French Revolutionary calendar
+# Copyright (c) 2003, 2004, 2010, 2011, 2014 Jean Forget. All rights reserved.
+#
+# See the license in the embedded documentation below.
+#
package DateTime::Calendar::FrenchRevolutionary::Locale::en;
+use utf8;
+use strict;
+use warnings;
use vars qw($VERSION);
-$VERSION = '0.11'; # same as parent module DT::C::FR
+$VERSION = '0.12'; # same as parent module DT::C::FR
my @months_short = qw (Vin Fog Fro Sno Rai Win Bud Flo Mea Rea Hea Fru S-C);
@@ -53,115 +61,115 @@ my %time_formats = (
my @feast = (
# Vendémiaire
qw(
- grape saffron ?sweet_chestnut ?colchic horse
- impatiens carrot amaranth parsnip vat
- potato strawflower ?squash mignonette donkey
- four_o'clock_flower pumpkin buckwheat sunflower wine-press
- hemp peach turnip amaryllis ox
- eggplant chili_pepper tomato barley barrel
+ grape saffron ?sweet_chestnut ?colchic horse
+ balsam carrot amaranth parsnip vat
+ potato everlasting ?squash mignonette donkey
+ four_o'clock_flower pumpkin buckwheat sunflower wine-press
+ hemp peach turnip amaryllis ox
+ eggplant chili_pepper tomato barley barrel
),
# Brumaire
qw(
- apple celery pear beet_root goose
- heliotrope fig black_salsify ?whitebeam plow
- salsify water_chestnut jerusalem_artichoke endive turkey
- skirret cress ?plumbago pomegranate harrow
- ?bacchante azarole madder orange pheasant
- pistachio tuberous_pea quince service_tree roller
+ apple celery pear beetroot goose
+ heliotrope fig black_salsify ?whitebeam plow
+ salsify water_chestnut jerusalem_artichoke endive turkey
+ skirret cress ?plumbago pomegranate harrow
+ ?bacchante azarole madder orange pheasant
+ pistachio tuberous_pea quince service_tree roller
),
# Frimaire
qw(
- rampion turnip chicory medlar pig
- corn_salad cauliflower honey juniper pickaxe
- wax horseradish cedar_tree fir_tree roe_deer
- gorse cypress_tree ivy savin_juniper grub-hoe
- maple_tree heather reed sorrel cricket
- pinenut cork truffle olive shovel
+ rampion turnip chicory medlar pig
+ corn_salad cauliflower honey juniper pickaxe
+ wax horseradish cedar_tree fir_tree roe_deer
+ gorse cypress_tree ivy savin_juniper grub-hoe
+ maple_tree heather reed sorrel cricket
+ pine_nut cork truffle olive shovel
),
# Nivôse
qw(
- peat coal bitumen sulphur dog
- lava topsoil manure saltpeter flail
- granite clay slate sandstone rabbit
- flint marl limestone marble winnowing_basket
- gypsum salt iron copper cat
- tin lead zinc mercury sieve
+ peat coal bitumen sulphur dog
+ lava topsoil manure saltpeter flail
+ granite clay slate sandstone rabbit
+ flint marl limestone marble winnowing_basket
+ gypsum salt iron copper cat
+ tin lead zinc mercury sieve
),
# Pluviôse
qw(
- spurge_laurel moss butcher's_broom snowdrop bull
- laurustinus tinder_polypore mezereon poplar_tree axe
- hellebore broccoli laurel common_hazel cow
- box_tree lichen yew_tree lungwort billhook
- pennycress daphne couch_grass common_knotgrass hare
- woad hazel_tree cyclamen celandine sleigh
+ spurge_laurel moss butcher's_broom snowdrop bull
+ laurustinus tinder_polypore mezereon poplar_tree axe
+ hellebore broccoli laurel common_hazel cow
+ box_tree lichen yew_tree lungwort billhook
+ penny-cress daphne couch_grass common_knotgrass hare
+ woad hazel_tree cyclamen celandine sleigh
),
# Ventôse
qw(
- coltsfoot dogwood ?hoary_stock privet billygoat
- wild_ginger mediterranean_buckthorn violet goat_willow spade
- narcissus elm_tree fumitory hedge_mustard goat
- spinach leopard's_bane pimpernel chervil line
- mandrake parsley scurvy_grass daisy tuna_fish
- dandelion windflower maidenhair_fern ash_tree dibble
+ coltsfoot dogwood ?hoary_stock privet billygoat
+ wild_ginger mediterranean_buckthorn violet goat_willow spade
+ narcissus elm_tree fumitory hedge_mustard goat
+ spinach leopard's_bane pimpernel chervil line
+ mandrake parsley scurvy-grass daisy tuna_fish
+ dandelion windflower maidenhair_fern ash_tree dibble
),
# Germinal
qw(
- primula plane_tree asparagus tulip hen
- chard birch_tree daffodil alder hatchery
- periwinkle hornbeam morel beech_tree bee
- lettuce larch hemlock radish hive
- ?redbud roman_lettuce chestnut_tree rocket pigeon
- lilac anemone pansy blueberry grafter
+ primula plane_tree asparagus tulip hen
+ chard birch_tree daffodil alder hatchery
+ periwinkle hornbeam morel beech_tree bee
+ lettuce larch hemlock radish hive
+ ?redbud roman_lettuce chestnut_tree rocket pigeon
+ lilac anemone pansy blueberry dibber
),
# Floréal
qw(
- rose oak_tree fern hawthorn nightingale
- columbine lily_of_the_valley mushroom hyacinth rake
- rhubarb sainfoin wallflower ?chamerops silkworm
- comfrey burnet basket_of_gold orache hoe
- ?statice fritillary borage valerian carp
- spindletree chive bugloss wild_mustard shepherd_staff
+ rose oak_tree fern hawthorn nightingale
+ columbine lily_of_the_valley mushroom hyacinth rake
+ rhubarb sainfoin wallflower ?chamerops silkworm
+ comfrey burnet basket_of_gold orache hoe
+ ?statice fritillary borage valerian carp
+ spindletree chive bugloss wild_mustard shepherd_staff
),
# Prairial
qw(
- alfalfa day-lily clover angelica duck
- lemon_balm oat_grass martagon wild_thyme scythe
- strawberry betony pea acacia quail
- carnation elder_tree poppy lime pitchfork
- barbel camomile honeysuckle bedstraw tench
- jasmine vervain thyme peony carriage
+ alfalfa day-lily clover angelica duck
+ lemon_balm oat_grass martagon wild_thyme scythe
+ strawberry betony pea acacia quail
+ carnation elder_tree poppy lime pitchfork
+ barbel camomile honeysuckle bedstraw tench
+ jasmine vervain thyme peony carriage
),
# Messidor
qw(
- rye oats onion speedwell mule
- rosemary cucumber shallot wormwood sickle
- coriander artichoke clove lavender chamois
- tobacco currant vetchling cherry park
- mint cumin bean alkanet guinea_hen
- sage garlic tare corn shawm
+ rye oats onion speedwell mule
+ rosemary cucumber shallot wormwood sickle
+ coriander artichoke clove lavender chamois
+ tobacco currant vetchling cherry park
+ mint cumin bean alkanet guinea_hen
+ sage garlic tare corn shawm
),
# Thermidor
qw(
- spelt mullein melon ryegrass ram
- horsetail mugwort safflower blackberry watering_can
- ?parsnip glasswort apricot basil ewe
- marshmallow flax almond gentian waterlock
- carline_thistle caper lentil horseheal otter
- myrtle oil-seed_rape lupin cotton mill
+ spelt mullein melon ryegrass ram
+ horsetail mugwort safflower blackberry watering_can
+ ?parsnip glasswort apricot basil ewe
+ marshmallow flax almond gentian waterlock
+ carline_thistle caper lentil horseheal otter
+ myrtle oil-seed_rape lupin cotton mill
),
# Fructidor
qw(
- plum millet lycoperdon barley salmon
- tuberose bere dogbane liquorice stepladder
- watermelon fennel barberry walnut trout
- lemon teasel buckthorn marigold harverting_basket
- wild_rose hazelnut hops sorghum crayfish
- bitter_orange goldenrod corn chestnut basket
+ plum millet lycoperdon barley salmon
+ tuberose bere dogbane liquorice stepladder
+ watermelon fennel barberry walnut trout
+ lemon teasel buckthorn marigold harvesting_basket
+ wild_rose hazelnut hops sorghum crayfish
+ bitter_orange goldenrod corn chestnut basket
),
# Jours complémentaires
qw(
- virtue engineering labour opinion rewards
+ virtue engineering labour opinion rewards
revolution
));
@@ -245,17 +253,15 @@ sub default_datetime_format { join ' ', ( $_[0]->default_date_format, $_[0]->def
sub default_date_format_length { $default_date_format_length }
sub default_time_format_length { $default_time_format_length }
-sub month_names { [ @months ] }
-sub month_abbreviations { [ @months_short ] }
-sub day_names { [ @decade_days ] }
-sub day_abbreviations { [ @decade_days_short ] }
-sub am_pms { [ @am_pms ] }
-sub date_formats { \%date_formats }
-sub time_formats { \%time_formats }
-sub date_before_time { $date_before_time }
-sub _default_date_format_length { $default_date_format_length }
-sub _default_time_format_length { $default_time_format_length }
-sub date_parts_order { $date_parts_order }
+sub month_names { [ @months ] }
+sub month_abbreviations { [ @months_short ] }
+sub day_names { [ @decade_days ] }
+sub day_abbreviations { [ @decade_days_short ] }
+sub am_pms { [ @am_pms ] }
+sub date_formats { \%date_formats }
+sub time_formats { \%time_formats }
+sub date_before_time { $date_before_time }
+sub date_parts_order { $date_parts_order }
sub on_date {
my ($self, $date) = @_;
@@ -266,78 +272,75 @@ sub on_date {
sub _load_events {
%event = ('dummy', split /(\d{4})\n/, <<'EVENTS');
0101
-1 Vendémiaire I. The French troops enter Savoie
+1 Vendémiaire I The French troops enter Savoy.
-1 Vendémiaire III. The posts in the woods of Aachen and Reckem are
+1 Vendémiaire III The posts in the woods of Aachen and Reckem are
taken by the Army of North.
0102
-2 Vendémiaire I. Conquest of Chambéry
+2 Vendémiaire I Conquest of Chambéry.
-2 Vendémiaire III. The Costouge redoubt and camp are taken by the Army
-of Eastern Pyrenees.
+2 Vendémiaire III The Costouge redoubt and camp are taken by the Army of Eastern Pyrenees.
-2 Vendémiaire V. The Army of Italy routs the enemy at Governolo.
+2 Vendémiaire V The Army of Italy routs the enemy at Governolo.
0103
-3 Vendémiaire IV. Affair of Garesio.
+3 Vendémiaire IV Affair of Garesio.
0104
-4 Vendémiaire II. The Army of Alps takes the
-Chatillon fieldworks; Piemontese rout across the Giffe river.
+4 Vendémiaire II The Army of Alps takes the Chatillon fieldworks; Piemontese rout across the Giffe river.
0105
-5 Vendémiaire III. The Spanish are defeated in Olia and Monteilla by the
+5 Vendémiaire III The Spanish are defeated in Olia and Monteilla by the
Army of Eastern Pyrenees.
0106
-6 Vendémiaire III. Surrender at Crevecoeur to the Army of the North.
+6 Vendémiaire III Surrender at Crevecoeur to the Army of the North.
-6 Vendémiaire III. Kayserlautern, Alsborn and other surrounding posts
+6 Vendémiaire III Kayserlautern, Alsborn and other surrounding posts
are taken again by the Army of the Rhine.
-6 Vendémiaire V. The enemy attacks the Army of Sambre and Meuse at
+6 Vendémiaire V The enemy attacks the Army of Sambre and Meuse at
Wurstatt, Nider-Ulm, Ober and Nider-Ingelheim; the attack is repulsed.
-6 Vendémiaire XII Birth of Prosper Mérimée
+6 Vendémiaire XII Birth of Prosper Mérimée, French writer.
0107
-7 Vendémiaire I. Anselme's troops conquer the city of Nice and the Montalban fortress.
+7 Vendémiaire I Anselme's troops conquer the city of Nice and the Montalban fortress.
-7 Vendémiaire II. The Army of Alps (Verdelin) defeats the enemy in the Sallanges
+7 Vendémiaire II The Army of Alps (Verdelin) defeats the enemy in the Sallanges
defiles and takes the Saint-Martin redoubt.
0108
-8 Vendémiaire V. 150 men from the Army of Italy sortie from Mantoue to forage.
+8 Vendémiaire V 150 men from the Army of Italy sortie from Mantoue to forage.
They must surrender to the people of Reggio.
0109
-9 Vendémiaire I. Custines' French conquer Spire.
+9 Vendémiaire I Custines' French conquer Spire.
-9 Vendémiaire II. The Army of Alps takes the fieldworks at
+9 Vendémiaire II The Army of Alps takes the fieldworks at
Mont-Cormet, previously held by Piemontese.
0111
-11 Vendémiaire II. Prisy's troops (Army of Alps) take the Valmeyer outpost
+11 Vendémiaire II Prisy's troops (Army of Alps) take the Valmeyer outpost
after a bayonet charge, Saint-André's and Chamberlhac's troops take the Beaufort
post, General-in-Chief Kellerman's troops take Moutiers and the Saint-Maurice
town and Ledoyen's troops storm the Madeleine pass post.
-11 Vendémiaire III. Battle of Aldenhoven, the Army of Sambre and Meuse
+11 Vendémiaire III Battle of Aldenhoven, the Army of Sambre and Meuse
routs the coalised troops.
-11 Vendémiaire V. The Army of Rhine and Moselle attacks
+11 Vendémiaire V The Army of Rhine and Moselle attacks
on the whole front and routs the enemy.
0112
-12 Vendémiaire II. The Spanish troops are repulsed back in their camps in the Boulon
+12 Vendémiaire II The Spanish troops are repulsed back in their camps in the Boulon
and Argelès by the Army of Eastern Pyrenees.
-12 Vendémiaire III. The land of Juliers surrenders to the Army of Sambre and Meuse.
+12 Vendémiaire III The land of Juliers surrenders to the Army of Sambre and Meuse.
0113
-13 Vendémiaire I. The Austrians must leave Worms
-and Custines' troops enter the city.
+13 Vendémiaire I The Austrians must leave Worms and Custines' troops enter the city.
13 Vendémiaire II Army of Eastern Pyrenees: Dagobert's troops take
Campredon while the Colioure garrison fights and routs the Spanish cavalry.
@@ -345,64 +348,64 @@ Campredon while the Colioure garrison fights and routs the Spanish cavalry.
13 Vendémiaire II Army of Western Pyrenees. Attacks and capture of the
Arau and Aure valley posts.
-13 Vendémiaire IV. Bonaparte suppresses a royalist demonstration at the
-Saint-Roch church in Paris
+13 Vendémiaire IV Bonaparte suppresses a royalist demonstration at the
+Saint-Roch church in Paris.
0115
-15 Vendémiaire III. Cologne surrenders to the Army of Sambre and Meuse.
+15 Vendémiaire III Cologne surrenders to the Army of Sambre and Meuse.
0116
-16 Vendémiaire V. The enemy, blockaded in Mantoue by the Army of Italy
+16 Vendémiaire V The enemy, blockaded in Mantoue by the Army of Italy
attempt a 4,600-troop sortie but fails.
0117
-17 Vendémiaire I. The Austrians call off the siege of Lille.
+17 Vendémiaire I The Austrians call off the siege of Lille.
-17 Vendémiaire III. Fight for and capture of Frankenthal by the Army of the Rhine.
+17 Vendémiaire III Fight for and capture of Frankenthal by the Army of the Rhine.
0118
-18 Vendémiaire II. Bombardment of Lyon, which opens her gates to
+18 Vendémiaire II Bombardment of Lyon, which opens her gates to
Dubois-de-Crancé's troops.
-18 Vendémiaire III. Capture of Shelaudenbach and Vollfstein by the Army of the Rhine
+18 Vendémiaire III Capture of Shelaudenbach and Vollfstein by the Army of the Rhine
which links with the Army of Moselle in Lautreck.
0119
-19 Vendémiaire III. Before Maestricht, the Army of Sambre and Meuse takes back
+19 Vendémiaire III Before Maestricht, the Army of Sambre and Meuse takes back
the Mont-Saint-Pierre castle.
0120
-20 Vendémiaire III. The Army of Moselle marches on Birkenfeldt, Oberstein,
+20 Vendémiaire III The Army of Moselle marches on Birkenfeldt, Oberstein,
Kirn and Meisenheim.
0121
-21 Vendémiaire III. The Army of the North enters in Bois-le-Duc.
+21 Vendémiaire III The Army of the North enters in Bois-le-Duc.
0122
-22 Vendémiaire I. Kellerman forces the Prussians to leave the city of Verdun.
+22 Vendémiaire I Kellerman forces the Prussians to leave the city of Verdun.
He enters Verdun and continues his march to the Prussians.
0123
-23 Vendémiaire III. The Army of the Rhine takes Otterberg, Rockenhausen,
+23 Vendémiaire III The Army of the Rhine takes Otterberg, Rockenhausen,
Landsberg, Alzein and Oberhausen.
0124
-24 Vendémiaire II. The Army of Moselle fights and routs the
+24 Vendémiaire II The Army of Moselle fights and routs the
Coalised who had advanced on Bitche and Rorbach.
-24 Vendémiaire III. Fight for and capture of Gellheim and Grunstad by
+24 Vendémiaire III Fight for and capture of Gellheim and Grunstad by
the Army of the Rhine; the French capture also Frankenthal.
0125
-25 Vendémiaire II. Combat near Sarreguemines; the Army of Moselle
+25 Vendémiaire II Combat near Sarreguemines; the Army of Moselle
repulses the enemy.
-25 Vendémiaire II. Queen Marie-Antoinette is beheaded.
+25 Vendémiaire II Queen Marie-Antoinette is beheaded.
0126
-26 Vendémiaire I. The Austrians attack Hasnon and fail several times.
+26 Vendémiaire I The Austrians attack Hasnon and fail several times.
-26 Vendémiaire II. Victory of Wattignies near Maubeuge against the
+26 Vendémiaire II Victory of Wattignies near Maubeuge against the
Austrians and end of the blockade of Maubeuge.
26 Vendémiaire III The Army of Western Pyrenees takes
@@ -414,7 +417,7 @@ Moreau's troops take Creutznach and Custines' troops take Worms.
26 Vendémiaire VI Army of Italy. Peace treaty in Campo-Formio
near Udine between Bonaparte and the Austrians.
-26 Vendémiaire VI. Congress in Rastadt to conclude peace between the
+26 Vendémiaire VI Congress in Rastadt to conclude peace between the
French Republic and the German Empire.
0127
@@ -443,13 +446,13 @@ Austrians to leave Mayence.
29 Vendémiaire III The Armée of Moselle enters Bingen.
-29 Vendémiaire V. The Army of Italy, debarking in Corsica,
+29 Vendémiaire V The Army of Italy, debarking in Corsica,
captures Bastia, Saint-Florent and Bonifacio.
29 Vendémiaire XIV Battle of Trafalgar.
0130
-30 Vendémiaire II. The Army of Western Pyrenees
+30 Vendémiaire II The Army of Western Pyrenees
routs three Spanish columns after a five-hour firefight.
30 Vendémiaire V Army of Sambre and Meuse. Enemy crossing of the Rhine
@@ -536,7 +539,7 @@ where it is beaten and repulsed to the Segonzano village.
crosses back after a murderous fight.
0216
-16 Brumaire I. Battle of Gemmapes. Following this victory, the
+16 Brumaire I Battle of Gemmapes. Following this victory, the
French enter Mons.
16 Brumaire III Army of the North. The fort of Schenk is taken.
@@ -546,12 +549,12 @@ French enter Mons.
garrison is repulsed by a French bayonet charge.
0218
-18 Brumaire I. The French capture Tournay.
+18 Brumaire I The French capture Tournay.
18 Brumaire III Army of the North. Triumphant entry of the French
into Nimègue.
-18 Brumaire VIII. Bonaparte's coup: end of Directorate, beginning of Consulate
+18 Brumaire VIII Bonaparte's coup: end of Directorate, beginning of Consulate.
0219
19 Brumaire IV Army of the North. Burick taken.
@@ -568,17 +571,17 @@ between Saint-Michel and Saint-Martin, the enemy is repulsed.
22 Brumaire I Army of the North. The city of Gand open her gates to
the French army.
-22 Brumaire I. Charleroy taken by the French.
+22 Brumaire I Charleroy taken by the French.
22 Brumaire III Army of the Rhine. Monbach and neighbour posts
taken, capture of Weissenau.
0223
-23 Brumaire I. Battle of Anderlecht near Bruxelles. The
+23 Brumaire I Battle of Anderlecht near Bruxelles. The
French army enters in Brussels.
0224
-24 Brumaire I. Capture of Frankfurt.
+24 Brumaire I Capture of Frankfurt.
24 Brumaire II Army of the West. The Vendean rebels are defeated
before the walls of Granville.
@@ -588,12 +591,12 @@ before the walls of Granville.
on 27.
0226
-26 Brumaire I. The French control the town and harbour of Ostende,
+26 Brumaire I The French control the town and harbour of Ostende,
evacuated by the Austrians.
-26 Brumaire I. Saint-Remi captured.
+26 Brumaire I Saint-Remi captured.
-26 Brumaire I. The town of Malines capitulates.
+26 Brumaire I The town of Malines capitulates.
26 Brumaire II Army of the Rhine. The army launches a surprise attack
and captures three enemy posts near Strasburg.
@@ -626,7 +629,7 @@ Duke of Parme.
29 Brumaire II The Army of the Rhine captures two redoubts near
Bouxweiller.
-29 Brumaire VIII Birth of René Caillé, the first European to enter Timbuktu
+29 Brumaire VIII Birth of René Caillé, the first European to enter Timbuktu.
0230
30 Brumaire II Army of Eastern Pyrenees. Victorious battle at Escola,
@@ -662,7 +665,7 @@ artillery is spiked.
0303
3 Frimaire IV Army of Italy. Fight at Intrapa and Garesio.
-3 Frimaire V. Sortie by the garrison of Mantoue, which is repulsed.
+3 Frimaire V Sortie by the garrison of Mantoue, which is repulsed.
0304
4 Frimaire II Army of Italy. 800 Piemontese defeated by 500 French at
@@ -701,12 +704,12 @@ bridge and the fieldworks at Gambsheim are taken.
11 Frimaire III Army of the Rhine And Moselle. The redoubt known as
"Merlin redoubt" before Mayence is taken.
-11 Frimaire V. The enemy, arrayed in three columns, attacks the
+11 Frimaire V The enemy, arrayed in three columns, attacks the
bridghead at Huningue and takes a fortification but is repulsed.
-11 Frimaire XIII. Napoleon the First is crowned Emperor of the French
+11 Frimaire XIII Napoleon the First is crowned Emperor of the French.
-11 Frimaire XIV. Battle of Austerlitz: the French army crushes the Austro-Russian army
+11 Frimaire XIV Battle of Austerlitz: the French army crushes the Austro-Russian army.
0312
12 Frimaire II Army of Ardennes. Strong sortie of the Givet garrison,
@@ -728,7 +731,7 @@ Salbach redoubts.
19 Frimaire II Army of the Rhine. The Dawendorff highgrounds are captured.
0320
-20 Frimaire XII Birth of Hector Berlioz
+20 Frimaire XII Birth of Hector Berlioz, French musician.
0321
21 Frimaire I Army of the North. Capture of Wezem, Wert and Ruremonde.
@@ -742,7 +745,7 @@ near Le Mans.
near Saint-Jean-de-Luz; they must cross the Bidassoa.
0324
-24 Frimaire I. The French troops take the towns
+24 Frimaire I The French troops take the towns
of Mertzicq, Fredembourg and Saarbruck.
0325
@@ -753,7 +756,7 @@ highgrounds of Marsal, Dahnbruck and Lambach.
and redoubts that were defending Toulon.
0326
-26 Frimaire I. Capture of Consarbruck.
+26 Frimaire I Capture of Consarbruck.
26 Frimaire II Army of Italy. Toulon conquered, the English and
Spanish troops flee.
@@ -852,7 +855,7 @@ Lower-Rhine department. The Vauban fort is taken back.
29 Nivôse III Army of the North. Capture of Gertuydemberg.
0430
-30 Nivôse VI Birth of Auguste Comte
+30 Nivôse VI Birth of Auguste Comte, French philosopher.
0502
2 Pluviôse I Louis XVI is beheaded.
@@ -918,7 +921,7 @@ Chauvin-Dragon.
Adige right bank. Derunbano captured.
0520
-20 Pluviôse IV Birth of Barthélémy Prosper Enfantin
+20 Pluviôse IV Birth of Barthélémy Prosper Enfantin, French social reformer.
0521
21 Pluviôse V Army of Italy. The Pope's troops, on the highground
@@ -953,7 +956,7 @@ The French, attacked in Bidole, smash the enemy. Kellerman crosses
the Piave in San-Mamma, and routs some enemy hussards.
0607
-7 Ventôse X. Birth of Victor Hugo
+7 Ventôse X. Birth of Victor Hugo.
0611
11 Ventôse III Army of Eastern Pyrenees. Bezalu captured.
@@ -970,7 +973,7 @@ di-Savaro and beat him.
the enemy is defeated.
0617
-17 Ventôse I. War is declared on the King of Spain.
+17 Ventôse I War is declared on the King of Spain.
0618
18 Ventôse II Army of the Moselle. Three Austrian battalions are
@@ -989,7 +992,7 @@ to the Vidor village and repulses the enemy.
23 Ventôse V Army of Italy. Fight in Sacile. Fight in Bellurn, in
which the enemy rearguard is surrounded and taken prisoner.
-23 Ventôse VI. After five murderous fights, the Swiss evacuate Morat.
+23 Ventôse VI After five murderous fights, the Swiss evacuate Morat.
0626
26 Ventôse V Army of Italy. Crossing of the Tagliamento, despite a
@@ -1042,7 +1045,7 @@ resistance, the enemy is routed.
position is taken.
0707
-26 Germinal V Birth of Alfred de Vigny
+7 Germinal V Birth of Alfred de Vigny, French poet.
0708
8 Germinal V Army of Italy. Enemy battalions, fresh from the Rhine
@@ -1130,7 +1133,7 @@ Austro-Sards. Fight at Dego, the enemy is routed. Fight and capture
of Saint-Jean, in the valley of Barmida. Capture of Batisolo, Bagnosco
and Pontenocetto. Capture of the Montezemo redoubts.
-26 Germinal V Birth of Adolphe Thiers
+26 Germinal V Birth of Adolphe Thiers, French writer and politician.
0727
27 Germinal II Army of the Moselle. The French occupy the highground
@@ -1188,7 +1191,7 @@ Arrola.
4000 Spanish infantry troops and 10 Spanish cavalry squadrons rout at
Roqueluche.
-7 Floréal VI Birth of Eugène Delacroix
+7 Floréal VI Birth of Eugène Delacroix, French painter.
0808
8 Floréal II Army of Eastern Pyrenees. 3000 French troops repulse
@@ -1339,7 +1342,7 @@ and Erquelinne after a 6-hour fight.
1 Prairial IV Army of Italy. An armistice with the Duke of Modene is
concluded.
-1 Prairial VII. Birth of Honoré de Balzac
+1 Prairial VII Birth of Honoré de Balzac, French writer.
0904
4 Prairial II Army of the Rhine. Battle of Schifferstadt, won
@@ -1406,7 +1409,7 @@ captured.
14 Prairial II Army of the Ardennes. The enemy is routed near the
Sainte-Marie woods.
-14 Prairial IV Birth of Sadi Carnot
+14 Prairial IV Birth of Sadi Carnot, French politician.
0915
15 Prairial II Army of Western Pyrenees. Battle won on several
@@ -1471,7 +1474,7 @@ their victorious advances until Gosselies.
24 Prairial III Army of Sambre and Meuse. Capture of Luxembourg.
0925
-25 Prairial VIII. Battle of Marengo, Italy. The same day, Kleber assassinated in Cairo
+25 Prairial VIII Battle of Marengo, Italy. The same day, general Kleber assassinated in Cairo.
0926
26 Prairial II United Armies of Moselle, Ardennes and North. Near
@@ -1571,7 +1574,7 @@ Deva.
11 Messidor IV Army of Italy. The Milan castle capitulates.
1012
-12 Messidor XII Birth of George Sand
+12 Messidor XII Birth of George Sand, French writer.
1013
13 Messidor II Army of Sambre and Meuse. Capture of the Roxule
@@ -1747,7 +1750,7 @@ of Spain.
4 Thermidor IV Army of Sambre and Meuse. Capture of Schwinfurt.
1105
-5 Thermidor X Birth of Alexandre Dumas the elder.
+5 Thermidor X Birth of Alexandre Dumas the elder, French writer.
1106
6 Thermidor II Army of Eastern Pyrenees. The Republican troops enter
@@ -1766,12 +1769,14 @@ Koenigstein fort.
1109
9 Thermidor I Army of Sambre and Meuse. The French enter Liège.
-9 Thermidor II. Robespierre's downfall.
+9 Thermidor II Robespierre's downfall.
1110
10 Thermidor II Army of the North. Capture of Cassandria and crossing
of the Cacysche.
+10 Thermidor II Robespierre and several of his followers (Couthon, Saint-Just, etc) are beheaded.
+
1111
11 Thermidor III Army of the Alps and Italy. Assault on the redoubts
of the di Pietri field.
@@ -1790,7 +1795,7 @@ beaten at Lonado.
1114
Army of Italy. Brescia taken back.
-14 Thermidor VII Birth of Sophie Rostopchine, later known as countess of Ségur
+14 Thermidor VII Birth of Sophie Rostopchine, later known as countess of Ségur.
1115
15 Thermidor IV Army of Sambre and Meuse. Capture of Koenigshoffen.
@@ -2076,7 +2081,7 @@ river; capture of Limbourg, Dietz and Nasseau.
Army of Italy. Austrian defeat on the Borghetto line.
-3 additional day V. Death of general Hoche, general-in-chief of
+3 additional day V Death of general Hoche, general-in-chief of
the Army of Sambre and Meuse.
1304
@@ -2091,13 +2096,13 @@ are stormed, after 7 successive attacks.
Army of Italy. Victory at Cairo over the Piemontese, supported by
10,000 Austrians.
-4 additional day III. Surrender of Manheim.
+4 additional day III Surrender of Manheim.
1305
5 additional day II Army of Western Pyrenees. Spanish troops at
Mont-Roch are routed.
-5 additional day IV. Death of general Marceau, aged 27, killed at
+5 additional day IV Death of general Marceau, aged 27, killed at
Altenkirchen by a carbine shot.
EVENTS
delete $event{dummy};
@@ -2231,9 +2236,32 @@ L<http://en.wikipedia.org/wiki/French_Republican_Calendar>
=head1 LICENSE STUFF
-Copyright (c) 2003, 2004, 2010, 2011, 2012 Jean Forget. All rights
+Copyright (c) 2003, 2004, 2010, 2012, 2014 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 5.12.2.
+same terms as perl 5.16.3.
+
+This program is distributed 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 F<LICENSE> file or at
+L<http://www.perlfoundation.org/artistic_license_1_0> and
+L<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, see <http://www.gnu.org/licenses/> or
+write to the Free Software Foundation, Inc., L<http://fsf.org>.
=cut
@@ -1,11 +1,19 @@
-# Copyright (c) 2003, 2004, 2010, 2011 Jean Forget. All rights reserved.
# -*- 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 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.11'; # same as parent module DT::C::FR
+$VERSION = '0.12'; # 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);
@@ -240,17 +248,15 @@ sub default_datetime_format { join ' ', ( $_[0]->default_date_format, $_[0]->def
sub default_date_format_length { $default_date_format_length }
sub default_time_format_length { $default_time_format_length }
-sub month_names { [ @months ] }
-sub month_abbreviations { [ @months_short ] }
-sub day_names { [ @decade_days ] }
-sub day_abbreviations { [ @decade_days_short ] }
-sub am_pms { [ @am_pms ] }
-sub date_formats { \%date_formats }
-sub time_formats { \%time_formats }
-sub date_before_time { $date_before_time }
-sub _default_date_format_length { $default_date_format_length }
-sub _default_time_format_length { $default_time_format_length }
-sub date_parts_order { $date_parts_order }
+sub month_names { [ @months ] }
+sub month_abbreviations { [ @months_short ] }
+sub day_names { [ @decade_days ] }
+sub day_abbreviations { [ @decade_days_short ] }
+sub am_pms { [ @am_pms ] }
+sub date_formats { \%date_formats }
+sub time_formats { \%time_formats }
+sub date_before_time { $date_before_time }
+sub date_parts_order { $date_parts_order }
sub on_date {
my ($self, $date) = @_;
@@ -261,24 +267,24 @@ sub on_date {
sub _load_events {
%event = ('dummy', split /(\d{4})\n/, <<'EVENTS');
0101
-1 Vendémiaire I. Entrée des troupes françaises en Savoie
+1 Vendémiaire I Entrée des troupes françaises en Savoie.
-1 Vendémiaire III. Les postes du bois d'Aix-la-Chapelle et de Reckem sont enlevés
+1 Vendémiaire III Les postes du bois d'Aix-la-Chapelle et de Reckem sont enlevés
par l'Armée du Nord.
0102
-2 Vendémiaire I. Conquête de Chambéry.
+2 Vendémiaire I Conquête de Chambéry.
-2 Vendémiaire III. Prise de la redoute et du camp de Costouge par l'Armée des
+2 Vendémiaire III Prise de la redoute et du camp de Costouge par l'Armée des
Pyrénées orientales.
-2 Vendémiaire V. L'Armée d'Italie met en déroute l'ennemi à Governolo.
+2 Vendémiaire V L'Armée d'Italie met en déroute l'ennemi à Governolo.
0103
-3 Vendémiaire IV. Affaire de Garesio
+3 Vendémiaire IV Affaire de Garesio.
0104
-4 Vendémiaire II. L'Armée des Alpes enlève de vive force les retranchements
+4 Vendémiaire II L'Armée des Alpes enlève de vive force les retranchements
de Chatillon ; les Piémontais sont mis en déroute et repassent la rivière de Giffe.
0105
@@ -286,19 +292,19 @@ de Chatillon ; les Piémontais sont mis en déroute et repassent la rivière de
Espagnols à Olia et Monteilla.
0106
-6 Vendémiaire III. Capitulation de Crevecœur devant l'Armée du Nord.
+6 Vendémiaire III Capitulation de Crevecœur devant l'Armée du Nord.
6 Vendémiaire III Armée du Rhin. Reprise de Kayserlautern et d'Alsborn.
6 Vendémiaire V Armée de Sambre et Meuse. L'ennemi attaque sur les
points de Wurstatt, Nider-Ulm, Ober et Nider-Ingelheim et est repoussé.
-6 Vendémiaire XII Naissance de Prosper Mérimée
+6 Vendémiaire XII Naissance de Prosper Mérimée, écrivain français.
0107
-7 Vendémiaire I. Prise de la ville de Nice et de la forteresse de Montalban.
+7 Vendémiaire I Prise de la ville de Nice et de la forteresse de Montalban.
-7 Vendémiaire II. L'Armée des Alpes défait l'ennemi dans les gorges
+7 Vendémiaire II L'Armée des Alpes défait l'ennemi dans les gorges
de Sallanges et prend la redoute de Saint-Martin.
0108
@@ -306,9 +312,9 @@ de Sallanges et prend la redoute de Saint-Martin.
se procurer du fourrage et doivent se rendre aux habitants de Reggio.
0109
-9 Vendémiaire I. Les Français se rendent maîtres de la ville de Spire.
+9 Vendémiaire I Les Français se rendent maîtres de la ville de Spire.
-9 Vendémiaire II. L'Armée des Alpes enlève de vive-force les
+9 Vendémiaire II L'Armée des Alpes enlève de vive-force les
retranchements de Mont-Cormet tenus par les Piémontais.
0111
@@ -319,83 +325,83 @@ Madeleine.
11 Vendémiaire III Armée de Sambre-et-Meuse. Bataille d'Aldenhoven
et déroute des troupes coalisées.
-11 Vendémiaire V. L'Armée du Rhin et Moselle attaque sur toute la
+11 Vendémiaire V L'Armée du Rhin et Moselle attaque sur toute la
ligne et met l'ennemi en déroute.
0112
-12 Vendémiaire II. Les Espagnols sont forcés dans leurs camps du Boulon
+12 Vendémiaire II Les Espagnols sont forcés dans leurs camps du Boulon
et Argelès par l'Armée des Pyrénées orientales.
-12 Vendémiaire III. Le pays de Juliers se rend à l'Armée de Sambre-et-Meuse.
+12 Vendémiaire III Le pays de Juliers se rend à l'Armée de Sambre-et-Meuse.
0113
-13 Vendémiaire I. Les Autrichiens sont forcés d'évacuer la ville de Worms.
+13 Vendémiaire I Les Autrichiens sont forcés d'évacuer la ville de Worms.
13 Vendémiaire II Armée des Pyrénées orientales. Prise de Campredon et
déroute de la cavalerie espagnole par la garnison de Colioure.
-13 Vendémiaire II. L'Armée des Pyrénées occidentales attaque les postes d'Arau
+13 Vendémiaire II L'Armée des Pyrénées occidentales attaque les postes d'Arau
et de la vallée d'Aure et les enlève.
-13 Vendémiaire IV. Bonaparte réprime une manifestation royaliste à l'église Saint-Roch
+13 Vendémiaire IV Bonaparte réprime une manifestation royaliste à l'église Saint-Roch.
0115
-15 Vendémiaire III. Cologne se rend à l'Armée de Sambre-et-Meuse.
+15 Vendémiaire III Cologne se rend à l'Armée de Sambre-et-Meuse.
0116
-16 Vendémiaire V. L'ennemi, bloqué à Mantoue par l'Armée d'Italie tente
+16 Vendémiaire V L'ennemi, bloqué à Mantoue par l'Armée d'Italie tente
une sortie de 4 600 hommes, sortie qui se solde par un échec.
0117
-17 Vendémiaire I. Les Autrichiens lèvent le siège de Lille.
+17 Vendémiaire I Les Autrichiens lèvent le siège de Lille.
-17 Vendémiaire III. Combat et prise de Frankenthal par l'Armée du Rhin
+17 Vendémiaire III Combat et prise de Frankenthal par l'Armée du Rhin.
0118
-18 Vendémiaire II. Bombardement de Lyon.
+18 Vendémiaire II Bombardement de Lyon.
-18 Vendémiaire III. Prise de Shelaudenbach et de Vollfstein par l'Armée du Rhin
+18 Vendémiaire III Prise de Shelaudenbach et de Vollfstein par l'Armée du Rhin
et jonction avec l'Armée de la Moselle à Lautreck.
0119
-19 Vendémiaire III. Devant Maestricht, l'Armée de Sambre-et-Meuse reprend
+19 Vendémiaire III Devant Maestricht, l'Armée de Sambre-et-Meuse reprend
le château de Mont-Saint-Pierre.
0120
-20 Vendémiaire III. L'Armée de la Moselle marche sur Birkenfeldt, Oberstein,
+20 Vendémiaire III L'Armée de la Moselle marche sur Birkenfeldt, Oberstein,
Kirn et Meisenheim.
0121
-21 Vendémiaire III. Entrée de l'Armée du Nord dans Bois-le-Duc.
+21 Vendémiaire III Entrée de l'Armée du Nord dans Bois-le-Duc.
0122
-22 Vendémiaire I. Kellerman force les Prussiens à évacuer la ville de Verdun.
+22 Vendémiaire I Kellerman force les Prussiens à évacuer la ville de Verdun.
0123
-23 Vendémiaire III. L'Armée du Rhin prend Otterberg, Rockenhausen,
+23 Vendémiaire III L'Armée du Rhin prend Otterberg, Rockenhausen,
Landsberg, Alzein et Oberhausen.
0124
-24 Vendémiaire II. L'Armée de la Moselle combat et provoque la retraite
+24 Vendémiaire II L'Armée de la Moselle combat et provoque la retraite
précipitée des coalisés qui s'étaient portés sur Bitche et Rorbach.
-24 Vendémiaire III. Combat et prise de Gellheim et de Grunstad par
+24 Vendémiaire III Combat et prise de Gellheim et de Grunstad par
l'Armée du Rhin ; les Français reprennent aussi Frankenthal.
0125
-25 Vendémiaire II. Combat près de Sarreguemines ; l'Armée de la Moselle
+25 Vendémiaire II Combat près de Sarreguemines ; l'Armée de la Moselle
repousse l'ennemi.
-25 Vendémiaire II. Exécution de Marie-Antoinette.
+25 Vendémiaire II Exécution de Marie-Antoinette.
0126
-26 Vendémiaire I. Les Autrichiens attaquent plusieurs fois inutilement Hasnon
+26 Vendémiaire I Les Autrichiens attaquent plusieurs fois inutilement Hasnon
et sont repoussés avec perte.
-26 Vendémiaire II. La bataille de Wattignies près de Maubeuge est remportée
+26 Vendémiaire II La bataille de Wattignies près de Maubeuge est remportée
par l'Armée du Nord sur les Autrichiens et le blocus de Maubeuge est levé.
-26 Vendémiaire III. L'Armée des Pyrénées occidentales prend la
+26 Vendémiaire III L'Armée des Pyrénées occidentales prend la
mâture d'Iraty et les fonderies d'Egay et d'Orbaycette.
26 Vendémiaire III Armée de la Moselle. Prise de Creutznach et de Worms.
@@ -404,35 +410,35 @@ mâture d'Iraty et les fonderies d'Egay et d'Orbaycette.
près d'Udine entre le général Bonaparte et les plénipotentiaires de l'Empereur,
roi de Hongrie et de Bohême.
-26 Vendémiaire VI. Congrès à Rastadt pour la conclusion de la paix entre
+26 Vendémiaire VI Congrès à Rastadt pour la conclusion de la paix entre
la République française et l'Empire germanique.
0127
-27 Vendémiaire II. 600 républicains de l'Armée d'Italie remportent
+27 Vendémiaire II 600 républicains de l'Armée d'Italie remportent
l'avantage à Gillette sur 4 000 Autrichiens, Croates et Piémontais et les
repoussent.
-27 Vendémiaire III. L'Armée des Pyrénées occidentales défait 7 000
+27 Vendémiaire III L'Armée des Pyrénées occidentales défait 7 000
Espagnols près de Buruet et d'Almandos.
-27 Vendémiaire III. L'Armée du Rhin met en déroute l'ennemi près
+27 Vendémiaire III L'Armée du Rhin met en déroute l'ennemi près
de Kircheim et de Worms et prend ces deux villes.
0128
-28 Vendémiaire II. L'Armée d'Italie remporte
+28 Vendémiaire II L'Armée d'Italie remporte
une victoire complète à Gilette sur les Piémontais.
-28 Vendémiaire III. L'Armée du Nord défait l'ennemi près de Nimègue
+28 Vendémiaire III L'Armée du Nord défait l'ennemi près de Nimègue
et détruit la légion de Rohan.
-28 Vendémiaire V. L'Armée du Rhin et Moselle est attaquée à Retzengen
+28 Vendémiaire V L'Armée du Rhin et Moselle est attaquée à Retzengen
et à Simonswald.
0129
-29 Vendémiaire I. L'Armée française force les
+29 Vendémiaire I L'Armée française force les
Autrichiens à évacuer Mayence.
-29 Vendémiaire III. L'Armée de la Moselle entre dans Bingen
+29 Vendémiaire III L'Armée de la Moselle entre dans Bingen
après avoir chassé les Prussiens des positions qu'ils tenaient en avant
de la ville.
@@ -442,7 +448,7 @@ de Bastia, de Saint-Florent et de Bonifacio.
29 Vendémiaire XIV Bataille de Trafalgar.
0130
-30 Vendémiaire II. L'Armée des Pyrénées occidentales met
+30 Vendémiaire II L'Armée des Pyrénées occidentales met
en déroute trois colonnes espagnoles après une fusillade de cinq heures.
30 Vendémiaire V Armée de Sambre et Meuse. L'ennemi passe le Rhin sur
@@ -510,7 +516,7 @@ d'une batterie ennemie, en avant de Ville longue.
sur les revers de la montagne Noire.
0212
-12 Brumaire I. Les Autrichiens sont forcés d'évacuer Lanoy.
+12 Brumaire I Les Autrichiens sont forcés d'évacuer Lanoy.
12 Brumaire III Armée de la Moselle. Entrée des Français dans
Rheinfels, évacué par douze cents ennemis.
@@ -528,7 +534,7 @@ Segonzano.
obligé de la repasser après un combat meurtrier.
0216
-16 Brumaire I. Bataille de Gemmapes. Les Français entrent dans Mons.
+16 Brumaire I Bataille de Gemmapes. Les Français entrent dans Mons.
16 Brumaire III Armée du Nord. Prise du fort de Schenk.
@@ -537,12 +543,12 @@ obligé de la repasser après un combat meurtrier.
Berg-op-zomm est repoussée.
0218
-18 Brumaire I. Prise de la ville de Tournay par les Français.
+18 Brumaire I Prise de la ville de Tournay par les Français.
18 Brumaire III Armée du Nord. Entrée triomphante des Français dans
Nimègue.
-18 Brumaire VIII. Coup d'état de Bonaparte : fin du Directoire, début du Consulat
+18 Brumaire VIII Coup d'état de Bonaparte : fin du Directoire, début du Consulat.
0219
19 Brumaire IV Armée du Nord. Prise de Burick.
@@ -560,7 +566,7 @@ le poursuit l'espace de trois milles.
22 Brumaire I Armée du Nord. La ville de Gand ouvre ses portes à
l'armée française.
-22 Brumaire I. Prise de Charleroy par les Français.
+22 Brumaire I Prise de Charleroy par les Français.
22 Brumaire III Armée du Rhin. Prise de Monbach et de tous les postes
de la forêt en avant de ce village.
@@ -568,12 +574,12 @@ de la forêt en avant de ce village.
22 Brumaire III Armée du Rhin. Prise de Weissenau.
0223
-23 Brumaire I. Bataille d'Anderlecht près Bruxelles. Défaite
+23 Brumaire I Bataille d'Anderlecht près Bruxelles. Défaite
complète de l'ennemi, l'armée française fait son entrée triomphante
dans Bruxelles.
0224
-24 Brumaire I. Prise de la ville de Francfort.
+24 Brumaire I Prise de la ville de Francfort.
24 Brumaire II Armée de l'Ouest. Défaite des rebelles de la Vendée
sous les murs de Granville.
@@ -582,19 +588,19 @@ sous les murs de Granville.
25 Brumaire V Armée d'Italie. Bataille d'Arcole, conclue le 27.
0226
-26 Brumaire I. Les Français se rendent maîtres de la ville et du port
+26 Brumaire I Les Français se rendent maîtres de la ville et du port
d'Ostende, évacué par les Autrichiens.
-26 Brumaire I. Prise de Sainte-Remi.
+26 Brumaire I Prise de Sainte-Remi.
-26 Brumaire I. Capitulation de la ville de Malines.
+26 Brumaire I Capitulation de la ville de Malines.
26 Brumaire II Armée du Rhin. L'armée surprend et enlève près de
Strasbourg trois postes ennemis vaillamment défendus.
26 Brumaire II Le siège de la ville de Granville est levé.
-26 Brumaire IV. Combat du champ di Pietri.
+26 Brumaire IV Combat du champ di Pietri.
0227
27 Brumaire II Armée de la Moselle. Défaite autrichienne
@@ -623,7 +629,7 @@ Parme.
29 Brumaire II L'Armée du Rhin enlève deux redoutes formidables près
de Bouxweiller.
-29 Brumaire VIII Naissance de René Caillé, le premier européen à entrer à Tombouctou
+29 Brumaire VIII Naissance de René Caillé, le premier européen à entrer à Tombouctou.
0230
30 Brumaire II Armée des Pyrénées orientales. Bataille gagnée à Escola,
@@ -661,7 +667,7 @@ garnison de Kehl.
0303
3 Frimaire IV Armée d'Italie. Combat d'Intrapa et de Garesio.
-3 Frimaire V. Sortie faite par la garnison de Mantoue, qui est
+3 Frimaire V Sortie faite par la garnison de Mantoue, qui est
brusquement repoussée.
0304
@@ -687,7 +693,7 @@ de Figuières.
Espagnols à Begara, Ascuatia et Aspetia.
0310
-10 Frimaire I Armée du Nord. Capitulation de la citadelle d'Anvers
+10 Frimaire I Armée du Nord. Capitulation de la citadelle d'Anvers.
10 Frimaire II Armée du Nord. Attaque des postes ennemis sur
la Lys.
@@ -705,12 +711,12 @@ Landgraben et des retranchements de Gambsheim.
11 Frimaire III Armée du Rhin et Moselle. Enlèvement de la redoute,
dite de Merlin, devant Mayence.
-11 Frimaire V. L'ennemi attaque la tête du pont d'Huningue et s'empare
+11 Frimaire V L'ennemi attaque la tête du pont d'Huningue et s'empare
de la demi-lune mais en est délogé.
-11 Frimaire XIII. Napoléon Premier est couronné Empereur des Français
+11 Frimaire XIII Napoléon Premier est couronné Empereur des Français.
-11 Frimaire XIV. Bataille d'Austerlitz : l'armée française écrase l'armée austro-russe
+11 Frimaire XIV Bataille d'Austerlitz : l'armée française écrase l'armée austro-russe.
0312
12 Frimaire II Armée des Ardennes. Vigoureuse sortie de la garnison
@@ -732,7 +738,7 @@ vive force les redoutes de Salbach.
une action très vive.
0320
-20 Frimaire XII Naissance d'Hector Berlioz
+20 Frimaire XII Naissance d'Hector Berlioz, musicien français.
0321
21 Frimaire I Armée du Nord. Prise des villes de Wezem et de Wert et
@@ -747,7 +753,7 @@ de la Vendée, près et dans la ville du Mans.
près de Saint-Jean-de-Luz ; ils sont forcés de repasser la Bidassoa.
0324
-24 Frimaire I. Après plusieurs combats, les troupes françaises se
+24 Frimaire I Après plusieurs combats, les troupes françaises se
rendent maîtres des villes de Mertzicq, de Fredembourg et de
Saarbruck.
@@ -759,7 +765,7 @@ hauteurs de Marsal du Dahnbruck et de Lambach.
force les retranchements et redoutes qui défendaient Toulon.
0326
-26 Frimaire I. Prise de Consarbruck.
+26 Frimaire I Prise de Consarbruck.
26 Frimaire II Armée d'Italie. Prise de Toulon, fuite précipitée des
Anglais et des Espagnols.
@@ -869,7 +875,7 @@ Bas-Rhin par les coalisés ; reprise du fort Vauban.
29 Nivôse III Armée du Nord. Prise de Gertuydemberg.
0430
-30 Nivôse VI Naissance d'Auguste Comte
+30 Nivôse VI Naissance d'Auguste Comte, philosophe français.
0502
2 Pluviôse I Exécution de Louis XVI.
@@ -906,7 +912,7 @@ Républicains sur deux colonnes, font une sortie de la tête de pont
d'Huningue et chassent l'ennemi des deux premières parallèles.
0513
-13 Pluviôse I. La république française déclare la guerre au roi
+13 Pluviôse I La république française déclare la guerre au roi
d'Angleterre et au stathouder de Hollande.
13 Pluviôse VI Armée d'Italie. Une des colonnes de l'armée d'Italie,
@@ -939,7 +945,7 @@ par cinq mille républicains.
sur la droite de l'Adige ; prise de Derunbano.
0520
-20 Pluviôse IV Naissance de Barthélémy Prosper Enfantin
+20 Pluviôse IV Naissance de Barthélémy Prosper Enfantin, membre du mouvement saint-simonien.
0521
21 Pluviôse V Armée d'Italie. Prise d'Ancône.
@@ -974,7 +980,7 @@ Les Français, attaqués à Bidole, battent complètement l'ennemi.
Kellerman passe la Piave à San-Mamma, et met en fuite des hussards ennemis.
0607
-7 Ventôse X. Naissance de Victor Hugo
+7 Ventôse X. Naissance de Victor Hugo.
0611
11 Ventôse III Armée des Pyrénées orientales. Prise de Bezalu.
@@ -991,23 +997,23 @@ di-Savaro et le défont.
défaite de l'ennemi.
0617
-17 Ventôse I. Déclaration de guerre au roi d'Espagne.
+17 Ventôse I Déclaration de guerre au roi d'Espagne.
0618
18 Ventôse II Armée de la Moselle. Défaite de trois bataillons
autrichiens sur les hauteurs des forges de Jœgerthal.
0620
-20 Ventôse V. Armée d'Italie. Une division de l'armée française se
+20 Ventôse V Armée d'Italie. Une division de l'armée française se
rend à Feltre ; à son approche l'ennemi évacue la ligne de Cordevole
et se porte sur Bellurn.
0622
-22 Ventôse V. Armée d'Italie. Passage de la Piave vis-à-vis le
+22 Ventôse V Armée d'Italie. Passage de la Piave vis-à-vis le
village de Vidor, l'ennemi évacue son camp de la Gampana.
0623
-23 Ventôse V. Armée d'Italie. Combat de Sacile.
+23 Ventôse V Armée d'Italie. Combat de Sacile.
Affaire de Bellurn, dans laquelle l'arrière-garde ennemie est
enveloppée et faite prisonnière.
@@ -1067,7 +1073,7 @@ résistance, l'ennemi est mis en déroute.
important.
0707
-26 Germinal V Naissance d'Alfred de Vigny
+7 Germinal V Naissance d'Alfred de Vigny, poête français.
0708
8 Germinal V Armée d'Italie. Des bataillons ennemis, fraîchement
@@ -1159,7 +1165,7 @@ Austro-Sardes. Combat de Dego, déroute de l'ennemi. Combat et prise
de Saint-Jean, dans la vallée de la Barmida. Prise de Batisolo, de
Bagnosco et de Pontenocetto. Prise des redoutes de Montezemo.
-26 Germinal V Naissance d'Adolphe Thiers
+26 Germinal V Naissance d'Adolphe Thiers, écrivain et homme politique français.
0727
27 Germinal II Armée de la Moselle. Les Français occupent les
@@ -1226,7 +1232,7 @@ poste du rocher d'Arrola.
Déroute de quatre mille hommes d'infanterie et de dix escadrons de
cavalerie espagnole à Roqueluche ; perte considérable de l'ennemi.
-7 Floréal VI Naissance d'Eugène Delacroix
+7 Floréal VI Naissance d'Eugène Delacroix, peintre français.
0808
8 Floréal II Armée des Pyrénées orientales. Les Français, au nombre
@@ -1390,7 +1396,7 @@ Erquelinne, après un combat de six heures.
1 Prairial IV Armée d'Italie. Conclusion d'une armistice avec le duc
de Modène.
-1 Prairial VII. Naissance d'Honoré de Balzac
+1 Prairial VII Naissance d'Honoré de Balzac, écrivain français.
0904
4 Prairial II Armée du Rhin. Bataille de Schifferstadt, gagnée par
@@ -1424,7 +1430,7 @@ de Dinan.
Armée des Pyrénées orientales. Evacuation par l'ennemi des forts
Saint-Elme et Port-Vendre, reprise de Collioure.
-7 Prairial III. Dix mille hommes d'infanterie, et douze cents de
+7 Prairial III Dix mille hommes d'infanterie, et douze cents de
cavalerie, espagnole attaquent une reconnaissance faite par les
troupes du camp des hauteurs de Pontos ; mais ils sont mis en déroute.
@@ -1433,7 +1439,7 @@ troupes du camp des hauteurs de Pontos ; mais ils sont mis en déroute.
7 Prairial V Exécution de Gracchus Babeuf.
0908
-8 Prairial III. Traité de paix et d'alliance, conclu à la Haye, entre
+8 Prairial III Traité de paix et d'alliance, conclu à la Haye, entre
la République française et les membres des états-généraux de Hollande.
0911
@@ -1463,7 +1469,7 @@ Acher.
14 Prairial II Armée des Ardennes. Déroute des ennemis, près du bois
de Sainte-Marie.
-14 Prairial IV Naissance de Sadi Carnot
+14 Prairial IV Naissance de Sadi Carnot, homme politique français.
0915
15 Prairial II Armée des Pyrénées occidentales. Bataille gagnée sur
@@ -1529,7 +1535,7 @@ de Gosselies.
24 Prairial III Armée de Sambre et Meuse. Prise de Luxembourg.
0925
-25 Prairial VIII. Bataille de Marengo en Italie, Kléber est assassiné au Caire
+25 Prairial VIII Bataille de Marengo en Italie. Le général Kléber est assassiné au Caire le même jour.
0926
26 Prairial II Armée de la Moselle, des Ardennes, et du Nord réunies.
@@ -1637,7 +1643,7 @@ retranché de Deva.
11 Messidor IV Armée d'Italie. Capitulation du château de Milan.
1012
-12 Messidor XII Naissance de George Sand
+12 Messidor XII Naissance de George Sand, écrivain français.
1013
13 Messidor II Armée de Sambre et Meuse. Enlèvement des redoutes et
@@ -1821,7 +1827,7 @@ hauteurs en arrière de Tirlemont.
3 Thermidor II Armée de Sambre et Meuse. Déroute de l'ennemi à Hui :
prise de Saint-Tros.
-3 Thermidor III Victoire de Hoche à Quiberon contre les royalistes
+3 Thermidor III Victoire de Hoche à Quiberon contre les royalistes.
1104
4 Thermidor III Traité de paix conclu entre la République française et
@@ -1830,7 +1836,7 @@ le roi d'Espagne.
4 Thermidor IV Armée de Sambre et Meuse. Prise de Schwinfurt.
1105
-5 Thermidor X Naissance d'Alexandre Dumas père.
+5 Thermidor X Naissance d'Alexandre Dumas père, écrivain français.
1106
6 Thermidor II Armée des Pyrénées orientales. Entrée des républicains
@@ -1850,12 +1856,14 @@ Koenigstein.
9 Thermidor I Armée de Sambre et Meuse. Entrée des Français dans
Liège.
-9 Thermidor II. La chute de Robespierre.
+9 Thermidor II La chute de Robespierre.
1110
10 Thermidor II Armée du Nord. Prise de Cassandria et passage du
Cacysche.
+10 Thermidor II Robespierre et plusieurs de ses partisans (Couthon, Saint-Just, etc) sont guillotinés.
+
1111
11 Thermidor III Armée des Alpes et d'Italie. Enlèvement des redoutes
du champ di Pietri.
@@ -1874,7 +1882,7 @@ L'ennemi est battu à Lonado.
1114
Armée d'Italie. Reprise de Brescia.
-14 Thermidor VII Naissance de Sophie Rostopchine, future comtesse de Ségur
+14 Thermidor VII Naissance de Sophie Rostopchine, future comtesse de Ségur.
1115
15 Thermidor IV Armée de Sambre et Meuse. prise de Koenigshoffen.
@@ -2173,7 +2181,7 @@ 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
+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
@@ -2188,7 +2196,7 @@ 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.
+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
@@ -2203,3 +2211,135 @@ EVENTS
# 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 * 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.
+
+=back
+
+=head1 SUPPORT
+
+Support for this module is provided via the datetime@perl.org email
+list. See http://lists.perl.org/ for more details.
+
+=head1 AUTHOR
+
+Jean Forget <JFORGET@cpan.org>
+
+The development of this module is hosted by I<Les Mongueurs de Perl>,
+L<http://www.mongueurs.net/>.
+
+=head1 SEE ALSO
+
+=head2 Books
+
+Calendrier Militaire, anonymous
+
+=head2 Internet
+
+L<http://datetime.perl.org/>
+
+=head1 LICENSE STUFF
+
+Copyright (c) 2003, 2004, 2010, 2012, 2014 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 5.16.3.
+
+This program is distributed 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 F<LICENSE> file or at
+L<http://www.perlfoundation.org/artistic_license_1_0> and
+L<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, see <http://www.gnu.org/licenses/> or
+write to the Free Software Foundation, Inc., L<http://fsf.org>.
+
+=cut
@@ -1,11 +1,19 @@
-# Copyright (c) 2003, 2004, 2010, 2011 Jean Forget. All rights reserved.
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Perl DateTime extension for providing localised strings for the French Revolutionary calendar
+# Copyright (c) 2003, 2004, 2010, 2011, 2014 Jean Forget. All rights reserved.
+#
+# See the license in the embedded documentation below.
+#
package DateTime::Calendar::FrenchRevolutionary::Locale;
+use utf8;
use strict;
+use warnings;
use vars qw($VERSION);
-$VERSION = '0.11'; # same as parent module DT::C::FR
+$VERSION = '0.12'; # same as parent module DT::C::FR
sub load {
my ($self, $lang) = @_;
@@ -17,3 +25,60 @@ sub load {
# 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.
"Amour sacré de la patrie, conduis soutiens nos bras vengeurs.";
+
+__END__
+
+=encoding utf8
+
+=head1 NAME
+
+DateTime::Calendar::FrenchRevolutionary::Locale - Dates in the French Revolutionary Calendar
+
+=head1 DESCRIPTION
+
+Please refer to parent module:
+
+ perldoc DateTime::Calendar::FrenchRevolutionary
+
+=head1 SUPPORT
+
+Support for this module is provided via the datetime@perl.org email
+list. See L<http://lists.perl.org/> for more details.
+
+Please enter bug reports at L<http://rt.cpan.org/>
+
+=head1 AUTHOR
+
+Jean Forget <JFORGET@cpan.org>
+
+=head1 LICENSE STUFF
+
+Copyright (c) 2003, 2004, 2010, 2012, 2014 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 5.16.3.
+
+This program is distributed 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 F<LICENSE> file or at
+L<http://www.perlfoundation.org/artistic_license_1_0> and
+L<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, see <http://www.gnu.org/licenses/> or
+write to the Free Software Foundation, Inc., L<http://fsf.org>.
+
+=cut
@@ -1,13 +1,19 @@
# -*- encoding: utf-8; indent-tabs-mode: nil -*-
-# Copyright (c) 2003, 2004, 2010, 2011, 2012 Jean Forget. All rights reserved.
+#
+# Perl DateTime extension for converting to/from the French Revolutionary calendar
+# Copyright (c) 2003, 2004, 2010, 2011, 2012, 2014 Jean Forget. All rights reserved.
+#
+# See the license in the embedded documentation below.
+#
package DateTime::Calendar::FrenchRevolutionary;
+use utf8;
use strict;
+use warnings;
use vars qw($VERSION);
-
-$VERSION = '0.11';
+$VERSION = '0.12';
use Params::Validate qw(validate SCALAR BOOLEAN OBJECT);
use Roman;
@@ -75,7 +81,7 @@ my $BasicValidate =
{ "only 'fr' and 'en' possible" =>
sub { ($_[0] eq 'fr') or ($_[0] eq 'en') or ref($_[0]) =~ /(?:en|fr)$/ },
},
- default => 'fr' },
+ default => DefaultLocale() },
};
my $NewValidate =
@@ -98,7 +104,6 @@ sub new {
my $self = {};
$self->{tz} = DateTime::TimeZone->new(name => 'floating');
- $args{locale} = $class->DefaultLocale unless defined $args{locale};
if ( ref $args{locale} )
{ $self->{locale} = $args{locale} }
else
@@ -1414,9 +1419,32 @@ L<http://en.wikipedia.org/wiki/French_Republican_Calendar>
=head1 LICENSE STUFF
-Copyright (c) 2003, 2004, 2010, 2012 Jean Forget. All rights
+Copyright (c) 2003, 2004, 2010, 2012, 2014 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 5.12.2.
+same terms as perl 5.16.3.
+
+This program is distributed 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 F<LICENSE> file or at
+L<http://www.perlfoundation.org/artistic_license_1_0> and
+L<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, see <http://www.gnu.org/licenses/> or
+write to the Free Software Foundation, Inc., L<http://fsf.org>.
=cut
@@ -1,3 +1,31 @@
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Test script for DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2003, 2004, 2010, 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'
@@ -1,5 +1,36 @@
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Test script for DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2003, 2004, 2010, 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
use DateTime::Calendar::FrenchRevolutionary;
use DateTime;
+use utf8;
+use strict;
+use warnings;
# Empty class test:
package dtcfr;
@@ -14,7 +45,7 @@ my $n = 1;
sub r2g {
my ($n, $date_g, $y, $m, $d, $H, $M, $S) = @_;
my $date_r = DateTime::Calendar::FrenchRevolutionary->new(year => $y, month => $m, day => $d
- , hour => $H, minute => $M, second => $S);
+ , hour => $H, minute => $M, second => $S);
my $date_resul = DateTime->from_object(object => $date_r)->strftime("%Y %b %e %H %M %S");
if ($date_g eq $date_resul)
{ print "ok $n\n" }
@@ -26,7 +57,7 @@ sub r2g {
sub r2g_em {
my ($n, $date_g, $y, $m, $d, $H, $M, $S) = @_;
my $date_r = dtcfr::->new(year => $y, month => $m, day => $d
- , hour => $H, minute => $M, second => $S);
+ , hour => $H, minute => $M, second => $S);
my $date_resul = dt::->from_object(object => $date_r)->strftime("%Y %b %e %H %M %S");
if ($date_g eq $date_resul)
{ print "ok $n\n" }
@@ -34,36 +65,36 @@ sub r2g_em {
{ print "not ok $n : expected $date_g, got $date_resul\n" }
}
-@tests = (["1792 Sep 22 02 24 00", 1, 1, 1, 1, 0, 0],
- ["1793 Oct 23 06 00 00", 2, 2, 2, 2, 50, 0],
- ["1794 Jul 27 00 00 00", 2, 11, 9, 0, 0, 0], # the demise of Robespierre
- ["1794 Nov 23 10 00 00", 3, 3, 3, 4, 16, 67],
- ["1795 Oct 5 00 00 00", 4, 1, 13, 0, 0, 0], # Saint-Roch church demonstration
- ["1795 Dec 25 16 00 00", 4, 4, 4, 6, 66, 67],
- ["1797 Jan 24 16 59 59", 5, 5, 5, 7, 8, 33],
- ["1798 Feb 24 17 00 00", 6, 6, 6, 7, 8, 34],
- ["1799 Nov 9 00 00 00", 8, 2, 18, 0, 0, 0], # Bonaparte's coup
- ["1801 Mar 29 07 12 00", 9, 7, 8, 3, 0, 0],
- ["1804 Apr 30 00 00 08", 12, 8, 10, 0, 0, 10],
- ["1807 Jun 1 00 01 26", 15, 9, 12, 0, 1, 0],
- ["1810 Jul 3 00 00 00", 18, 10, 14, 0, 0, 0],
- ["1813 Aug 4 00 00 00", 21, 11, 16, 0, 0, 0],
- ["1816 Sep 4 00 00 00", 24, 12, 18, 0, 0, 0],
- ["2000 Jan 1 00 00 00", 208, 4, 12, 0, 0, 0], # Y2K compatible? Will your computer freeze or what?
- ["2001 May 11 00 00 00", 209, 8, 22, 0, 0, 0], # So long, Douglas, and thanks for all the fun
- ["2791 Sep 23 00 00 00", 1000, 1, 1, 0, 0, 0],
- ["2792 Sep 22 00 00 00", 1001, 1, 1, 0, 0, 0],
- ["3791 Sep 22 00 00 00", 2000, 1, 1, 0, 0, 0],
- ["3792 Sep 22 00 00 00", 2001, 1, 1, 0, 0, 0],
- ["4791 Sep 23 00 00 00", 3000, 1, 1, 0, 0, 0],
- ["4792 Sep 22 00 00 00", 3001, 1, 1, 0, 0, 0],
- ["5791 Sep 22 00 00 00", 4000, 1, 1, 0, 0, 0],
- ["5792 Sep 21 00 00 00", 4001, 1, 1, 0, 0, 0],
- ["6791 Sep 22 00 00 00", 5000, 1, 1, 0, 0, 0],
- ["6792 Sep 21 00 00 00", 5001, 1, 1, 0, 0, 0],
- ["7791 Sep 21 00 00 00", 6000, 1, 1, 0, 0, 0],
- ["7792 Sep 21 00 00 00", 6001, 1, 1, 0, 0, 0],
- );
+my @tests = (["1792 Sep 22 02 24 00", 1, 1, 1, 1, 0, 0],
+ ["1793 Oct 23 06 00 00", 2, 2, 2, 2, 50, 0],
+ ["1794 Jul 27 00 00 00", 2, 11, 9, 0, 0, 0], # the demise of Robespierre
+ ["1794 Nov 23 10 00 00", 3, 3, 3, 4, 16, 67],
+ ["1795 Oct 5 00 00 00", 4, 1, 13, 0, 0, 0], # Saint-Roch church demonstration
+ ["1795 Dec 25 16 00 00", 4, 4, 4, 6, 66, 67],
+ ["1797 Jan 24 16 59 59", 5, 5, 5, 7, 8, 33],
+ ["1798 Feb 24 17 00 00", 6, 6, 6, 7, 8, 34],
+ ["1799 Nov 9 00 00 00", 8, 2, 18, 0, 0, 0], # Bonaparte's coup
+ ["1801 Mar 29 07 12 00", 9, 7, 8, 3, 0, 0],
+ ["1804 Apr 30 00 00 08", 12, 8, 10, 0, 0, 10],
+ ["1807 Jun 1 00 01 26", 15, 9, 12, 0, 1, 0],
+ ["1810 Jul 3 00 00 00", 18, 10, 14, 0, 0, 0],
+ ["1813 Aug 4 00 00 00", 21, 11, 16, 0, 0, 0],
+ ["1816 Sep 4 00 00 00", 24, 12, 18, 0, 0, 0],
+ ["2000 Jan 1 00 00 00", 208, 4, 12, 0, 0, 0], # Y2K compatible? Will your computer freeze or what?
+ ["2001 May 11 00 00 00", 209, 8, 22, 0, 0, 0], # So long, Douglas, and thanks for all the fun
+ ["2791 Sep 23 00 00 00", 1000, 1, 1, 0, 0, 0],
+ ["2792 Sep 22 00 00 00", 1001, 1, 1, 0, 0, 0],
+ ["3791 Sep 22 00 00 00", 2000, 1, 1, 0, 0, 0],
+ ["3792 Sep 22 00 00 00", 2001, 1, 1, 0, 0, 0],
+ ["4791 Sep 23 00 00 00", 3000, 1, 1, 0, 0, 0],
+ ["4792 Sep 22 00 00 00", 3001, 1, 1, 0, 0, 0],
+ ["5791 Sep 22 00 00 00", 4000, 1, 1, 0, 0, 0],
+ ["5792 Sep 21 00 00 00", 4001, 1, 1, 0, 0, 0],
+ ["6791 Sep 22 00 00 00", 5000, 1, 1, 0, 0, 0],
+ ["6792 Sep 21 00 00 00", 5001, 1, 1, 0, 0, 0],
+ ["7791 Sep 21 00 00 00", 6000, 1, 1, 0, 0, 0],
+ ["7792 Sep 21 00 00 00", 6001, 1, 1, 0, 0, 0],
+ );
printf "1..%d\n", 2 * scalar @tests;
@@ -1,5 +1,36 @@
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Test script for DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2003, 2004, 2010, 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
use DateTime::Calendar::FrenchRevolutionary;
use DateTime;
+use utf8;
+use strict;
+use warnings;
# Empty class test:
package dtcfr;
@@ -32,32 +63,32 @@ sub g2r_em {
{ print "not ok $n : expected $date_r, got $date_resul\n" }
}
-@tests = ([" 1 Vendémiaire I", "%e %B %EY", 1792, 9, 22],
- [" 2 Brumaire II", "%e %B %EY", 1793, 10, 23],
- [" 9 Thermidor II", "%e %B %EY", 1794, 7, 27],
- [" 3 Frimaire III", "%e %B %EY", 1794, 11, 23],
- ["13 Vendémiaire IV", "%e %B %EY", 1795, 10, 5],
- [" 4 Nivôse IV", "%e %B %EY", 1795, 12, 25],
- [" 5 Pluviôse V", "%e %B %EY", 1797, 1, 24],
- [" 6 Ventôse VI", "%e %B %EY", 1798, 2, 24],
- ["18 Brumaire VIII", "%e %B %EY", 1799, 11, 9],
- [" 8 Germinal IX", "%e %B %EY", 1801, 3, 29],
- ["10 Floréal XII", "%e %B %EY", 1804, 4, 30],
- ["12 Prairial XV", "%e %B %EY", 1807, 6, 1],
- ["14 Messidor XVIII", "%e %B %EY", 1810, 7, 3],
- ["16 Thermidor XXI", "%e %B %EY", 1813, 8, 4],
- ["18 Fructidor XXIV", "%e %B %EY", 1816, 9, 4],
- ["12 Nivôse CCVIII", "%e %B %EY", 2000, 1, 1], # Y2K compatible?
- ["22 Floréal CCIX", "%e %B %EY", 2001, 5, 11],
- ["12 Nivôse MCCVIII", "%e %B %EY", 3000, 1, 1],
- ["11 Nivôse MCCIX", "%e %B %EY", 3001, 1, 1],
- ["12 Nivôse MMCCVIII", "%e %B %EY", 4000, 1, 1],
- ["12 Nivôse MMCCIX", "%e %B %EY", 4001, 1, 1],
- ["12 Nivôse MMMCCVIII", "%e %B %EY", 5000, 1, 1],
- ["11 Nivôse MMMCCIX", "%e %B %EY", 5001, 1, 1],
- ["13 Nivôse 4208", "%e %B %EY", 6000, 1, 1],
- ["13 Nivôse 4209", "%e %B %EY", 6001, 1, 1],
- );
+my @tests = ([" 1 Vendémiaire I", "%e %B %EY", 1792, 9, 22],
+ [" 2 Brumaire II", "%e %B %EY", 1793, 10, 23],
+ [" 9 Thermidor II", "%e %B %EY", 1794, 7, 27],
+ [" 3 Frimaire III", "%e %B %EY", 1794, 11, 23],
+ ["13 Vendémiaire IV", "%e %B %EY", 1795, 10, 5],
+ [" 4 Nivôse IV", "%e %B %EY", 1795, 12, 25],
+ [" 5 Pluviôse V", "%e %B %EY", 1797, 1, 24],
+ [" 6 Ventôse VI", "%e %B %EY", 1798, 2, 24],
+ ["18 Brumaire VIII", "%e %B %EY", 1799, 11, 9],
+ [" 8 Germinal IX", "%e %B %EY", 1801, 3, 29],
+ ["10 Floréal XII", "%e %B %EY", 1804, 4, 30],
+ ["12 Prairial XV", "%e %B %EY", 1807, 6, 1],
+ ["14 Messidor XVIII", "%e %B %EY", 1810, 7, 3],
+ ["16 Thermidor XXI", "%e %B %EY", 1813, 8, 4],
+ ["18 Fructidor XXIV", "%e %B %EY", 1816, 9, 4],
+ ["12 Nivôse CCVIII", "%e %B %EY", 2000, 1, 1], # Y2K compatible?
+ ["22 Floréal CCIX", "%e %B %EY", 2001, 5, 11],
+ ["12 Nivôse MCCVIII", "%e %B %EY", 3000, 1, 1],
+ ["11 Nivôse MCCIX", "%e %B %EY", 3001, 1, 1],
+ ["12 Nivôse MMCCVIII", "%e %B %EY", 4000, 1, 1],
+ ["12 Nivôse MMCCIX", "%e %B %EY", 4001, 1, 1],
+ ["12 Nivôse MMMCCVIII", "%e %B %EY", 5000, 1, 1],
+ ["11 Nivôse MMMCCIX", "%e %B %EY", 5001, 1, 1],
+ ["13 Nivôse 4208", "%e %B %EY", 6000, 1, 1],
+ ["13 Nivôse 4209", "%e %B %EY", 6001, 1, 1],
+ );
printf "1..%d\n", 2 * scalar @tests;
@@ -1,4 +1,35 @@
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Test script for DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
use DateTime::Calendar::FrenchRevolutionary;
+use utf8;
+use strict;
+use warnings;
my %years = qw/ 1 0 2 0 3 1 4 0 5 0 6 0 7 1 8 0 9 0 10 0
11 1 12 0 13 0 14 0 15 1 16 0 17 0 18 0 19 0 20 1
@@ -1,4 +1,35 @@
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Test script for DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
use DateTime::Calendar::FrenchRevolutionary;
+use utf8;
+use strict;
+use warnings;
# Yes, that's shotgun testing. You have in the end 990 tests and the
# 0.08 version would fail 57/990. So I guess that it is still a good
@@ -1,4 +1,35 @@
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Test script for DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
use DateTime::Calendar::FrenchRevolutionary;
+use utf8;
+use strict;
+use warnings;
my $n = 1;
my @tests = ( [ "0:41:66", "0:41:67", 1, 0, 0],
@@ -7,6 +38,12 @@ my @tests = ( [ "0:41:66", "0:41:67", 1, 0, 0],
[ "7:99:99", "8:00:00", 19, 12, 0],
[ "8:99:99", "9:00:00", 21, 36, 0],
);
+my @tests1 = ( [ "01-00-00", 1, 0, 0, '-'],
+ [ "01+45+00", 1, 45, 0, '+'],
+ [ "02*03*04", 2, 3, 4, '*'],
+ [ "19<->12<->00", 19, 12, 0, '<->'],
+ [ '21$$$36$$$00', 21, 36, 0, '$$$'],
+ );
sub check_time {
my ($n, $ch1, $ch2, $h, $m, $s) = @_;
@@ -23,9 +60,25 @@ sub check_time {
}
}
+sub check_time_1 {
+ my ($n, $ch1, $h, $m, $s, $sep) = @_;
+ my $dt = DateTime::Calendar::FrenchRevolutionary->new(
+ year => 1, month => 2, day => 3, abt_hour => $h, abt_minute => $m, abt_second => $s);
+ my $resul = $dt->abt_hms($sep);
+ if ($resul eq $ch1) {
+ print "ok $n\n";
+ }
+ else {
+ print "not ok $n : expected $ch1, got $resul\n";
+ }
+}
-printf "1..%d\n", scalar @tests;
+printf "1..%d\n", scalar(@tests) + scalar(@tests1);
for (@tests) {
check_time $n++, @$_;
}
+
+for (@tests1) {
+ check_time_1 $n++, @$_;
+}
@@ -1,5 +1,36 @@
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Test script for DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2003, 2004, 2010, 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
use DateTime::Calendar::FrenchRevolutionary;
use DateTime;
+use utf8;
+use strict;
+use warnings;
my $n = 1;
@@ -13,45 +44,44 @@ sub r2g {
{ print "not ok $n : expected $date_g, got $date_resul\n" }
}
-
-@tests = (["1792 Sep 22", 1, 1, 1],
- ["1793 Sep 21", 1, 13, 5],
- ["1793 Sep 22", 2, 1, 1],
- ["1794 Sep 21", 2, 13, 5],
- ["1794 Sep 22", 3, 1, 1],
- ["1795 Sep 22", 3, 13, 6],
- ["1795 Sep 23", 4, 1, 1],
- ["1796 Sep 21", 4, 13, 5],
- ["1796 Sep 22", 5, 1, 1],
- ["1797 Sep 21", 5, 13, 5],
- ["1797 Sep 22", 6, 1, 1],
- ["1799 Sep 22", 7, 13, 6],
- ["1799 Sep 23", 8, 1, 1],
- ["1800 Sep 22", 8, 13, 5],
- ["1800 Sep 23", 9, 1, 1],
- ["1801 Sep 22", 9, 13, 5],
- ["1801 Sep 23", 10, 1, 1],
- ["1823 Sep 22", 31, 13, 5],
- ["1823 Sep 23", 32, 1, 1],
- ["1824 Sep 22", 32, 13, 6],
- ["1824 Sep 23", 33, 1, 1],
- ["1825 Sep 22", 33, 13, 5],
- ["1825 Sep 23", 34, 1, 1],
- ["1892 Sep 21", 100, 13, 5],
- ["1892 Sep 22", 101, 1, 1],
- ["1900 Sep 22", 108, 13, 6],
- ["1900 Sep 23", 109, 1, 1],
- ["1992 Sep 21", 200, 13, 5],
- ["1992 Sep 22", 201, 1, 1],
- ["2000 Sep 21", 208, 13, 6],
- ["2000 Sep 22", 209, 1, 1],
- ["2092 Sep 20", 300, 13, 5],
- ["2092 Sep 21", 301, 1, 1],
- ["2100 Sep 21", 308, 13, 6],
- ["2100 Sep 22", 309, 1, 1],
- ["2192 Sep 21", 400, 13, 6],
- ["2192 Sep 22", 401, 1, 1],
- );
+my @tests = (["1792 Sep 22", 1, 1, 1],
+ ["1793 Sep 21", 1, 13, 5],
+ ["1793 Sep 22", 2, 1, 1],
+ ["1794 Sep 21", 2, 13, 5],
+ ["1794 Sep 22", 3, 1, 1],
+ ["1795 Sep 22", 3, 13, 6],
+ ["1795 Sep 23", 4, 1, 1],
+ ["1796 Sep 21", 4, 13, 5],
+ ["1796 Sep 22", 5, 1, 1],
+ ["1797 Sep 21", 5, 13, 5],
+ ["1797 Sep 22", 6, 1, 1],
+ ["1799 Sep 22", 7, 13, 6],
+ ["1799 Sep 23", 8, 1, 1],
+ ["1800 Sep 22", 8, 13, 5],
+ ["1800 Sep 23", 9, 1, 1],
+ ["1801 Sep 22", 9, 13, 5],
+ ["1801 Sep 23", 10, 1, 1],
+ ["1823 Sep 22", 31, 13, 5],
+ ["1823 Sep 23", 32, 1, 1],
+ ["1824 Sep 22", 32, 13, 6],
+ ["1824 Sep 23", 33, 1, 1],
+ ["1825 Sep 22", 33, 13, 5],
+ ["1825 Sep 23", 34, 1, 1],
+ ["1892 Sep 21", 100, 13, 5],
+ ["1892 Sep 22", 101, 1, 1],
+ ["1900 Sep 22", 108, 13, 6],
+ ["1900 Sep 23", 109, 1, 1],
+ ["1992 Sep 21", 200, 13, 5],
+ ["1992 Sep 22", 201, 1, 1],
+ ["2000 Sep 21", 208, 13, 6],
+ ["2000 Sep 22", 209, 1, 1],
+ ["2092 Sep 20", 300, 13, 5],
+ ["2092 Sep 21", 301, 1, 1],
+ ["2100 Sep 21", 308, 13, 6],
+ ["2100 Sep 22", 309, 1, 1],
+ ["2192 Sep 21", 400, 13, 6],
+ ["2192 Sep 22", 401, 1, 1],
+ );
printf "1..%d\n", scalar @tests;
@@ -1,5 +1,36 @@
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Test script for DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2003, 2004, 2010, 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
use DateTime::Calendar::FrenchRevolutionary;
use DateTime;
+use utf8;
+use strict;
+use warnings;
my $n = 1;
@@ -14,57 +45,57 @@ sub g2r {
}
-@tests = ([" 1 Vendémiaire I", "%e %B %EY", 1792, 9, 22],
- ["Jour des Récompenses I", "%EJ %EY", 1793, 9, 21],
- [" 1 Vendémiaire II", "%e %B %EY", 1793, 9, 22],
- ["Jour des Récompenses II", "%EJ %EY", 1794, 9, 21],
- [" 1 Vendémiaire III", "%e %B %EY", 1794, 9, 22],
- ["Jour de la Révolution III", "%EJ %EY", 1795, 9, 22],
- [" 1 Vendémiaire IV", "%e %B %EY", 1795, 9, 23],
- ["Jour des Récompenses IV", "%EJ %EY", 1796, 9, 21],
- [" 1 Vendémiaire V", "%e %B %EY", 1796, 9, 22],
- ["Jour des Récompenses V", "%EJ %EY", 1797, 9, 21],
- [" 1 Vendémiaire VI", "%e %B %EY", 1797, 9, 22],
- ["Jour des Récompenses VI", "%EJ %EY", 1798, 9, 21],
- [" 1 Vendémiaire VII", "%e %B %EY", 1798, 9, 22],
- ["Jour de la Révolution VII", "%EJ %EY", 1799, 9, 22],
- [" 1 Vendémiaire VIII", "%e %B %EY", 1799, 9, 23],
- ["Jour des Récompenses VIII", "%EJ %EY", 1800, 9, 22],
- [" 1 Vendémiaire IX", "%e %B %EY", 1800, 9, 23],
- ["Jour des Récompenses IX", "%EJ %EY", 1801, 9, 22],
- [" 1 Vendémiaire X", "%e %B %EY", 1801, 9, 23],
- ["Jour des Récompenses X", "%EJ %EY", 1802, 9, 22],
- [" 1 Vendémiaire LVI", "%e %B %EY", 1847, 9, 23],
- ["Jour de la Révolution LVI", "%EJ %EY", 1848, 9, 22],
- [" 1 Vendémiaire LVII", "%e %B %EY", 1848, 9, 23],
- ["Jour des Récompenses LVII", "%EJ %EY", 1849, 9, 22],
- [" 1 Vendémiaire LVIII", "%e %B %EY", 1849, 9, 23],
- ["Jour des Récompenses LVIII", "%EJ %EY", 1850, 9, 22],
- [" 1 Vendémiaire C", "%e %B %EY", 1891, 9, 23],
- ["Jour des Récompenses C", "%EJ %EY", 1892, 9, 21],
- [" 1 Vendémiaire CI", "%e %B %EY", 1892, 9, 22],
- ["Jour des Récompenses CI", "%EJ %EY", 1893, 9, 21],
- [" 1 Vendémiaire CVIII", "%e %B %EY", 1899, 9, 22],
- ["Jour de la Révolution CVIII", "%EJ %EY", 1900, 9, 22],
- [" 1 Vendémiaire CC", "%e %B %EY", 1991, 9, 23],
- ["Jour des Récompenses CC", "%EJ %EY", 1992, 9, 21],
- [" 1 Vendémiaire CCI", "%e %B %EY", 1992, 9, 22],
- ["Jour des Récompenses CCI", "%EJ %EY", 1993, 9, 21],
- [" 1 Vendémiaire CCVIII", "%e %B %EY", 1999, 9, 22],
- ["Jour de la Révolution CCVIII", "%EJ %EY", 2000, 9, 21],
- [" 1 Vendémiaire CCC", "%e %B %EY", 2091, 9, 22],
- ["Jour des Récompenses CCC", "%EJ %EY", 2092, 9, 20],
- [" 1 Vendémiaire CCCI", "%e %B %EY", 2092, 9, 21],
- ["Jour des Récompenses CCCI", "%EJ %EY", 2093, 9, 20],
- [" 1 Vendémiaire CCCVIII", "%e %B %EY", 2099, 9, 21],
- ["Jour de la Révolution CCCVIII", "%EJ %EY", 2100, 9, 21],
- [" 1 Vendémiaire CD", "%e %B %EY", 2191, 9, 22],
- ["Jour de la Révolution CD", "%EJ %EY", 2192, 9, 21],
- [" 1 Vendémiaire CDI", "%e %B %EY", 2192, 9, 22],
- ["Jour des Récompenses CDI", "%EJ %EY", 2193, 9, 21],
- [" 1 Vendémiaire CDVIII", "%e %B %EY", 2199, 9, 22],
- ["Jour de la Révolution CDVIII", "%EJ %EY", 2200, 9, 22],
- );
+my @tests = ([" 1 Vendémiaire I", "%e %B %EY", 1792, 9, 22],
+ ["Jour des Récompenses I", "%EJ %EY", 1793, 9, 21],
+ [" 1 Vendémiaire II", "%e %B %EY", 1793, 9, 22],
+ ["Jour des Récompenses II", "%EJ %EY", 1794, 9, 21],
+ [" 1 Vendémiaire III", "%e %B %EY", 1794, 9, 22],
+ ["Jour de la Révolution III", "%EJ %EY", 1795, 9, 22],
+ [" 1 Vendémiaire IV", "%e %B %EY", 1795, 9, 23],
+ ["Jour des Récompenses IV", "%EJ %EY", 1796, 9, 21],
+ [" 1 Vendémiaire V", "%e %B %EY", 1796, 9, 22],
+ ["Jour des Récompenses V", "%EJ %EY", 1797, 9, 21],
+ [" 1 Vendémiaire VI", "%e %B %EY", 1797, 9, 22],
+ ["Jour des Récompenses VI", "%EJ %EY", 1798, 9, 21],
+ [" 1 Vendémiaire VII", "%e %B %EY", 1798, 9, 22],
+ ["Jour de la Révolution VII", "%EJ %EY", 1799, 9, 22],
+ [" 1 Vendémiaire VIII", "%e %B %EY", 1799, 9, 23],
+ ["Jour des Récompenses VIII", "%EJ %EY", 1800, 9, 22],
+ [" 1 Vendémiaire IX", "%e %B %EY", 1800, 9, 23],
+ ["Jour des Récompenses IX", "%EJ %EY", 1801, 9, 22],
+ [" 1 Vendémiaire X", "%e %B %EY", 1801, 9, 23],
+ ["Jour des Récompenses X", "%EJ %EY", 1802, 9, 22],
+ [" 1 Vendémiaire LVI", "%e %B %EY", 1847, 9, 23],
+ ["Jour de la Révolution LVI", "%EJ %EY", 1848, 9, 22],
+ [" 1 Vendémiaire LVII", "%e %B %EY", 1848, 9, 23],
+ ["Jour des Récompenses LVII", "%EJ %EY", 1849, 9, 22],
+ [" 1 Vendémiaire LVIII", "%e %B %EY", 1849, 9, 23],
+ ["Jour des Récompenses LVIII", "%EJ %EY", 1850, 9, 22],
+ [" 1 Vendémiaire C", "%e %B %EY", 1891, 9, 23],
+ ["Jour des Récompenses C", "%EJ %EY", 1892, 9, 21],
+ [" 1 Vendémiaire CI", "%e %B %EY", 1892, 9, 22],
+ ["Jour des Récompenses CI", "%EJ %EY", 1893, 9, 21],
+ [" 1 Vendémiaire CVIII", "%e %B %EY", 1899, 9, 22],
+ ["Jour de la Révolution CVIII", "%EJ %EY", 1900, 9, 22],
+ [" 1 Vendémiaire CC", "%e %B %EY", 1991, 9, 23],
+ ["Jour des Récompenses CC", "%EJ %EY", 1992, 9, 21],
+ [" 1 Vendémiaire CCI", "%e %B %EY", 1992, 9, 22],
+ ["Jour des Récompenses CCI", "%EJ %EY", 1993, 9, 21],
+ [" 1 Vendémiaire CCVIII", "%e %B %EY", 1999, 9, 22],
+ ["Jour de la Révolution CCVIII", "%EJ %EY", 2000, 9, 21],
+ [" 1 Vendémiaire CCC", "%e %B %EY", 2091, 9, 22],
+ ["Jour des Récompenses CCC", "%EJ %EY", 2092, 9, 20],
+ [" 1 Vendémiaire CCCI", "%e %B %EY", 2092, 9, 21],
+ ["Jour des Récompenses CCCI", "%EJ %EY", 2093, 9, 20],
+ [" 1 Vendémiaire CCCVIII", "%e %B %EY", 2099, 9, 21],
+ ["Jour de la Révolution CCCVIII", "%EJ %EY", 2100, 9, 21],
+ [" 1 Vendémiaire CD", "%e %B %EY", 2191, 9, 22],
+ ["Jour de la Révolution CD", "%EJ %EY", 2192, 9, 21],
+ [" 1 Vendémiaire CDI", "%e %B %EY", 2192, 9, 22],
+ ["Jour des Récompenses CDI", "%EJ %EY", 2193, 9, 21],
+ [" 1 Vendémiaire CDVIII", "%e %B %EY", 2199, 9, 22],
+ ["Jour de la Révolution CDVIII", "%EJ %EY", 2200, 9, 22],
+ );
printf "1..%d\n", scalar @tests;
@@ -1,4 +1,35 @@
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Test script for DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2004, 2010, 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
use DateTime::Calendar::FrenchRevolutionary;
+use utf8;
+use strict;
+use warnings;
my $n = 1;
@@ -15,34 +46,33 @@ sub check_last {
}
}
-
-@tests = (["0001-13-05T5:85:90", 1, 13, 5, 85, 90],
- ["0002-13-05T5:85:90", 2, 13, 5, 85, 90],
- ["0003-13-06T5:85:90", 3, 13, 5, 85, 90],
- ["0006-13-05T5:85:90", 6, 13, 5, 85, 90],
- ["0007-13-06T5:85:90", 7, 13, 5, 85, 90],
- ["0010-13-05T5:85:90", 10, 13, 5, 85, 90],
- ["0011-13-06T5:85:90", 11, 13, 5, 85, 90],
- ["0014-13-05T5:85:90", 14, 13, 5, 85, 90],
- ["0015-13-06T5:85:90", 15, 13, 5, 85, 90],
- ["0099-13-05T5:85:90", 99, 13, 5, 85, 90],
- ["0100-13-05T5:85:90", 100, 13, 5, 85, 90],
- ["0199-13-05T5:85:90", 199, 13, 5, 85, 90],
- ["0200-13-05T5:85:90", 200, 13, 5, 85, 90],
- ["0212-01-30T5:85:90", 212, 1, 5, 85, 90],
- ["0212-02-30T5:85:90", 212, 2, 5, 85, 90],
- ["0211-03-30T0:17:90", 211, 3, 0, 17, 90],
- ["0211-10-30T9:17:99", 211, 10, 9, 17, 99],
- ["0211-12-30T9:07:09", 211, 12, 9, 7, 9],
- ["0211-13-05T8:01:01", 211, 13, 8, 1, 1],
- ["0212-13-06T8:01:01", 212, 13, 8, 1, 1],
- ["0299-13-05T5:85:90", 299, 13, 5, 85, 90],
- ["0300-13-05T5:85:90", 300, 13, 5, 85, 90],
- ["0399-13-05T5:85:90", 399, 13, 5, 85, 90],
- ["0400-13-06T5:85:90", 400, 13, 5, 85, 90],
- ["3999-13-05T5:85:90", 3999, 13, 5, 85, 90],
- ["4000-13-05T5:85:90", 4000, 13, 5, 85, 90],
- );
+my @tests = (["0001-13-05T5:85:90", 1, 13, 5, 85, 90],
+ ["0002-13-05T5:85:90", 2, 13, 5, 85, 90],
+ ["0003-13-06T5:85:90", 3, 13, 5, 85, 90],
+ ["0006-13-05T5:85:90", 6, 13, 5, 85, 90],
+ ["0007-13-06T5:85:90", 7, 13, 5, 85, 90],
+ ["0010-13-05T5:85:90", 10, 13, 5, 85, 90],
+ ["0011-13-06T5:85:90", 11, 13, 5, 85, 90],
+ ["0014-13-05T5:85:90", 14, 13, 5, 85, 90],
+ ["0015-13-06T5:85:90", 15, 13, 5, 85, 90],
+ ["0099-13-05T5:85:90", 99, 13, 5, 85, 90],
+ ["0100-13-05T5:85:90", 100, 13, 5, 85, 90],
+ ["0199-13-05T5:85:90", 199, 13, 5, 85, 90],
+ ["0200-13-05T5:85:90", 200, 13, 5, 85, 90],
+ ["0212-01-30T5:85:90", 212, 1, 5, 85, 90],
+ ["0212-02-30T5:85:90", 212, 2, 5, 85, 90],
+ ["0211-03-30T0:17:90", 211, 3, 0, 17, 90],
+ ["0211-10-30T9:17:99", 211, 10, 9, 17, 99],
+ ["0211-12-30T9:07:09", 211, 12, 9, 7, 9],
+ ["0211-13-05T8:01:01", 211, 13, 8, 1, 1],
+ ["0212-13-06T8:01:01", 212, 13, 8, 1, 1],
+ ["0299-13-05T5:85:90", 299, 13, 5, 85, 90],
+ ["0300-13-05T5:85:90", 300, 13, 5, 85, 90],
+ ["0399-13-05T5:85:90", 399, 13, 5, 85, 90],
+ ["0400-13-06T5:85:90", 400, 13, 5, 85, 90],
+ ["3999-13-05T5:85:90", 3999, 13, 5, 85, 90],
+ ["4000-13-05T5:85:90", 4000, 13, 5, 85, 90],
+ );
printf "1..%d\n", scalar @tests;
@@ -1,7 +1,38 @@
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Test script for DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2010, 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
# For some reasons, 45-lastday.t fails on some CPAN tester's machines.
# To investigate, here is a variant of the same test.
use DateTime::Calendar::FrenchRevolutionary;
+use utf8;
+use strict;
+use warnings;
my $n = 1;
@@ -26,14 +57,14 @@ sub check_last {
}
-@tests = ([ 1, 30, 212, 1, 5, 85, 90],
- [ 2, 30, 212, 2, 5, 85, 90],
- [ 3, 30, 211, 3, 0, 17, 90],
- [10, 30, 211, 10, 9, 17, 99],
- [12, 30, 211, 12, 9, 7, 9],
- [13, 5, 211, 13, 8, 1, 1],
- [13, 6, 212, 13, 8, 1, 1],
- );
+my @tests = ([ 1, 30, 212, 1, 5, 85, 90],
+ [ 2, 30, 212, 2, 5, 85, 90],
+ [ 3, 30, 211, 3, 0, 17, 90],
+ [10, 30, 211, 10, 9, 17, 99],
+ [12, 30, 211, 12, 9, 7, 9],
+ [13, 5, 211, 13, 8, 1, 1],
+ [13, 6, 212, 13, 8, 1, 1],
+ );
printf "1..%d\n", 2 * scalar @tests;
@@ -1,5 +1,36 @@
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Test script for DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2003, 2004, 2010, 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
use DateTime::Calendar::FrenchRevolutionary;
use DateTime;
+use utf8;
+use strict;
+use warnings;
# Checking dates with default French locale
sub g2r {
@@ -42,38 +73,38 @@ sub fr_t {
}
my @tests = (["Nonidi 09 Thermidor II", "%A %d %B %EY", 1794, 7, 27],
- ["Oct 18 Bru 0008", "%a %d %b %Y", 1799, 11, 9],
- ["0008", "%Y", 1799, 11, 9],
- ["%Y", "%%Y", 1799, 11, 9],
- ["%0008", "%%%Y", 1799, 11, 9],
- ["%%Y", "%%%%Y", 1799, 11, 9],
- ["13 Vnd, potiron", "%d %b, %Oj", 1797, 10, 4],
- # Groundhog day? No, jour de l'avelinier
- ["14 Plu, jour de l'avelinier 0209", "%d %b, %Ej %Y", 2001, 2, 2],
- ["14 Plu, Jour de l'Avelinier 0209", "%e %h, %EJ %G", 2001, 2, 2],
- ["14 Pluviôse, avelinier 0209", "%e %B, %Oj %L", 2001, 2, 2],
- ["Qua 14 Germinal CCIX, jour du hêtre", "%a %d %B %EY, %Ej", 2001, 4, 3],
+ ["Oct 18 Bru 0008", "%a %d %b %Y", 1799, 11, 9],
+ ["0008", "%Y", 1799, 11, 9],
+ ["%Y", "%%Y", 1799, 11, 9],
+ ["%0008", "%%%Y", 1799, 11, 9],
+ ["%%Y", "%%%%Y", 1799, 11, 9],
+ ["13 Vnd, potiron", "%d %b, %Oj", 1797, 10, 4],
+ # Groundhog day? No, jour de l'avelinier
+ ["14 Plu, jour de l'avelinier 0209", "%d %b, %Ej %Y", 2001, 2, 2],
+ ["14 Plu, Jour de l'Avelinier 0209", "%e %h, %EJ %G", 2001, 2, 2],
+ ["14 Pluviôse, avelinier 0209", "%e %B, %Oj %L", 2001, 2, 2],
+ ["Qua 14 Germinal CCIX, jour du hêtre", "%a %d %B %EY, %Ej", 2001, 4, 3],
["Primidi 11 Vendémiaire ccix, Jour de la Pomme de terre",
- "%A %d %B %Ey, %EJ", 2000, 10, 2],
+ "%A %d %B %Ey, %EJ", 2000, 10, 2],
["Primidi 11 Vendémiaire CCXIX, jour de la pomme de terre",
- "%A %d %B %EY, %*", 2010, 10, 2],
+ "%A %d %B %EY, %*", 2010, 10, 2],
["Quintidi 25 Vendémiaire CCXIX, jour du bœuf",
- "%A %d %B %EY, %*", 2010, 10, 16],
+ "%A %d %B %EY, %*", 2010, 10, 16],
["Sextidi 16 Prairial CCXIX, jour de l'œillet",
- "%A %d %B %EY, %*", 2011, 6, 4],
- [" 5 jour complémentaire 09, Jour des Récompenses",
- "%e %B %y, %EJ", 2001, 9, 21],
- ["5 jour complémentaire 209, Jour des Récompenses",
- "%{day} %{month_name} %{year}, %{feast_caps}", 2001, 9, 21],
- ["mois : 02 2, jour 046, jour du chervis",
- "mois : %m %f, jour %j, %Ej", 2000, 11, 6],
- ["mois : 2 Bru, jour 46, jour du chervis",
- "mois : %{month} %{month_abbr}, jour %{doy}, %{feast_long}", 2000, 11, 6],
- ["6 (Sextidi), jour de la bagarade", "%w (%A), %Ej", 2001, 9, 12],
- ["6 (Sextidi), jour de la bagarade",
- "%{wday} (%{day_name}), %{feast_long}", 2001, 9, 12],
- ["Décadi Déc 10", "%A %a %d", 1794, 7, 28],
- );
+ "%A %d %B %EY, %*", 2011, 6, 4],
+ [" 5 jour complémentaire 09, Jour des Récompenses",
+ "%e %B %y, %EJ", 2001, 9, 21],
+ ["5 jour complémentaire 209, Jour des Récompenses",
+ "%{day} %{month_name} %{year}, %{feast_caps}", 2001, 9, 21],
+ ["mois : 02 2, jour 046, jour du chervis",
+ "mois : %m %f, jour %j, %Ej", 2000, 11, 6],
+ ["mois : 2 Bru, jour 46, jour du chervis",
+ "mois : %{month} %{month_abbr}, jour %{doy}, %{feast_long}", 2000, 11, 6],
+ ["6 (Sextidi), jour de la bagarade", "%w (%A), %Ej", 2001, 9, 12],
+ ["6 (Sextidi), jour de la bagarade",
+ "%{wday} (%{day_name}), %{feast_long}", 2001, 9, 12],
+ ["Décadi Déc 10 10", "%A %a %d %u", 1794, 7, 28],
+ );
my @tests_en = (["Nineday 09 Heatidor II", "%A %d %B %EY", 1794, 7, 27],
["Firsday 11 Vintagearious ccix, Potato Day", "%A %d %B %Ey, %EJ", 2000, 10, 2],
@@ -81,15 +112,15 @@ my @tests_en = (["Nineday 09 Heatidor II", "%A %d %B %EY", 1794, 7, 27],
"%{day_name} %{day} %{month_name} %{year}, %{feast_caps}", 2000, 10, 2],
[" 5 additional day 09, Rewards Day", "%e %B %y, %EJ", 2001, 9, 21],
["Tenday Ten 10", "%A %a %d", 1794, 7, 28],
- );
+ );
my @tests_time = ([" 1 Fructidor 0212, 6:95:80", "%e %B %Y, %H:%M:%S", 'fr', 212, 12, 1, 6, 95, 80],
- ["6:95:80 PM", "%T %p", 'fr', 212, 12, 1, 6, 95, 80],
- ["6:95:80 PM", "%r", 'fr', 212, 12, 1, 6, 95, 80],
- ["3:95:80 AM", "%r", 'fr', 212, 12, 1, 3, 95, 80],
- ["3:95:80 AM", "%r", 'en', 212, 12, 1, 3, 95, 80],
- # almost every accessor at once
- [<<"RES", <<"FMT", 'fr', 212, 12, 1, 2, 51, 25],
+ ["6:95:80 PM", "%T %p", 'fr', 212, 12, 1, 6, 95, 80],
+ ["6:95:80 PM", "%r", 'fr', 212, 12, 1, 6, 95, 80],
+ ["3:95:80 AM", "%r", 'fr', 212, 12, 1, 3, 95, 80],
+ ["3:95:80 AM", "%r", 'en', 212, 12, 1, 3, 95, 80],
+ # almost every accessor at once
+ [<<"RES", <<"FMT", 'fr', 212, 12, 1, 2, 51, 25],
year: 212
month: 12, 11, Fructidor, Fru
day of month: 1, 1, 1, 0, 0, 0
@@ -116,8 +147,8 @@ sexagesimal time: %{abt_hour}, %{abt_minute}, %{abt_second}, %{abt_hms}
decade: %{decade_number}, %{week_number}
wrong method: %{wrong_method}
FMT
- # almost every specifier
- [<<"RES", <<"FMT", 'fr', 212, 12, 1, 6, 95, 80],
+ # almost every specifier
+ [<<"RES", <<"FMT", 'fr', 212, 12, 1, 6, 95, 80],
a Pri A Primidi b Fru B Fructidor C 2 d 01 D 12/01/12 e 1 F 0212-12-01 G 0212 g 12
h Fru H 6 I 6 j 331 k 6 l 6 m 12 M 95 p PM P pm r 6:95:80 PM R 6:95
S 80 T 6:95:80 u 1 U 34 V 34 w 1 W 34 y 12 Y 0212 Ey ccxii EY CCXII z +0000 Z floating
@@ -129,7 +160,7 @@ S %S T %T u %u U %U V %V w %w W %W y %y Y %Y Ey %Ey EY %EY z %z Z %Z
Ea %Ea EA %EA Oa %Oa OA %OA E! %E!
FMT
# same thing in English
- [<<"RES", <<"FMT", 'en', 212, 12, 1, 2, 51, 25],
+ [<<"RES", <<"FMT", 'en', 212, 12, 1, 2, 51, 25],
year: 212
month: 12, 11, Fruitidor, Fru
day of month: 1, 1, 1, 0, 0, 0
@@ -156,8 +187,8 @@ sexagesimal time: %{abt_hour}, %{abt_minute}, %{abt_second}, %{abt_hms}
decade: %{decade_number}, %{week_number}
wrong method: %{wrong_method}
FMT
- # almost every specifier
- [<<"RES", <<"FMT", 'en', 212, 12, 1, 6, 95, 80],
+ # almost every specifier
+ [<<"RES", <<"FMT", 'en', 212, 12, 1, 6, 95, 80],
a Fir A Firsday b Fru B Fruitidor C 2 d 01 D 12/01/12 e 1 F 0212-12-01 G 0212 g 12
h Fru H 6 I 6 j 331 k 6 l 6 m 12 M 95 p PM P pm r 6:95:80 PM R 6:95
S 80 T 6:95:80 u 1 U 34 V 34 w 1 W 34 y 12 Y 0212 Ey ccxii EY CCXII z +0000 Z floating
@@ -168,7 +199,7 @@ h %h H %H I %I j %j k %k l %l m %m M %M p %p P %P r %r R %R
S %S T %T u %u U %U V %V w %w W %W y %y Y %Y Ey %Ey EY %EY z %z Z %Z
Ea %Ea EA %EA Oa %Oa OA %OA E! %E!
FMT
- );
+ );
my $nb_tests = @tests + @tests_en + @tests_time;
my $n = 1;
@@ -1,5 +1,36 @@
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Test script for DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
use DateTime::Calendar::FrenchRevolutionary;
use DateTime;
+use utf8;
+use strict;
+use warnings;
# Checking dates with default French locale
sub g2r {
@@ -25,7 +56,7 @@ sub g2r_en {
my @format = @$ref_format;
my @date_r = @$ref_date_r;
my $date_g = DateTime->new(year => $y, month => $m, day => $d);
- my $date_resul = DateTime::Calendar::FrenchRevolutionary->from_object(object => $date_g)->set(locale => 'en')->strftime(@format);
+ my @date_resul = DateTime::Calendar::FrenchRevolutionary->from_object(object => $date_g)->set(locale => 'en')->strftime(@format);
my $ok = "ok";
for (my $i = 0; $i < @date_resul; $i++) {
@@ -41,8 +72,7 @@ sub g2r_en {
sub fr_t {
my ($n, $date_r, $format, $locale, $y, $m, $d, $H, $M, $S) = @_;
my $date_resul = DateTime::Calendar::FrenchRevolutionary->new(
- year => $y, month => $m, day => $d, hour => $H, minute => $M, second => $S,
- )->set(locale => $locale)->strftime($format);
+ year => $y, month => $m, day => $d, hour => $H, minute => $M, second => $S, locale => $locale)->strftime($format);
if ($date_r eq $date_resul) {
print "ok $n\n";
}
@@ -52,12 +82,12 @@ sub fr_t {
}
my @tests = ([ [ qw/Nonidi 09 Thermidor II/ ], [ qw/%A %d %B %EY/ ], 1794, 7, 27],
- [ [ qw/Oct 18 Bru 0008/ ], [ qw/%a %d %b %Y/ ], 1799, 11, 9],
- );
+ [ [ qw/Oct 18 Bru 0008/ ], [ qw/%a %d %b %Y/ ], 1799, 11, 9],
+ );
my @tests_en = ([ [ qw/Nineday 09 Heatidor II/ ], [ qw/%A %d %B %EY/ ], 1794, 7, 27],
[ [ qw/Tenday Ten 10/ ], [ qw/%A %a %d/ ], 1794, 7, 28],
- );
+ );
my $nb_tests = @tests + @tests_en;
@@ -1,13 +1,59 @@
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Test script for DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2010, 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
use DateTime::Calendar::FrenchRevolutionary::Locale::en;
use DateTime::Calendar::FrenchRevolutionary::Locale::fr;
+use utf8;
+use strict;
+use warnings;
+# Test with nearly empty subclass
+package Alten;
+use base 'DateTime::Calendar::FrenchRevolutionary::Locale::en';
+sub date_before_time { "0"; }
+
+package Altfr;
+use base 'DateTime::Calendar::FrenchRevolutionary::Locale::fr';
+sub date_before_time { "0"; }
+
+package main;
my $n = 0;
sub check {
- my ($method, $fr_result, $en_result) = @_;
+ my ($method, $fr_result, $en_result, $altfr_result, $alten_result) = @_;
+
+ $altfr_result = $fr_result unless defined $altfr_result;
+ $alten_result = $en_result unless defined $alten_result;
my $fr_test = DateTime::Calendar::FrenchRevolutionary::Locale::fr->$method;
my $en_test = DateTime::Calendar::FrenchRevolutionary::Locale::en->$method;
+ my $altfr_test = Altfr->$method;
+ my $alten_test = Alten->$method;
++ $n;
if ($fr_test eq $fr_result) {
@@ -25,6 +71,22 @@ sub check {
print "not ok $n : expected '$en_result', got '$en_test'\n";
}
+ ++ $n;
+ if ($altfr_test eq $altfr_result) {
+ print "ok $n\n";
+ }
+ else {
+ print "not ok $n : expected '$altfr_result', got '$altfr_test'\n";
+ }
+
+ ++ $n;
+ if ($alten_test eq $alten_result) {
+ print "ok $n\n";
+ }
+ else {
+ print "not ok $n : expected '$alten_result', got '$alten_test'\n";
+ }
+
}
@@ -39,15 +101,20 @@ my @tests = (
[ "medium_time_format", "%H:%M:%S", "%H:%M:%S", ],
[ "short_time_format", "%H:%M", "%H:%M", ],
[ "default_time_format", "%H:%M:%S", "%H:%M:%S", ],
- [ "full_datetime_format", "%A %d %B %EY, %{feast_long} %H h %M mn %S s", "%A %d %B %EY, %{feast_long} %H h %M mn %S s" ],
- [ "long_datetime_format", "%A %d %B %EY %H:%M:%S", "%A %d %B %EY %H:%M:%S" ],
- [ "medium_datetime_format", "%a %d %b %Y %H:%M:%S", "%a %d %b %Y %H:%M:%S" ],
- [ "short_datetime_format", "%d/%m/%Y %H:%M", "%d/%m/%Y %H:%M" ],
- [ "default_datetime_format", "%a %d %b %Y %H:%M:%S", "%a %d %b %Y %H:%M:%S" ],
+ [ "full_datetime_format", "%A %d %B %EY, %{feast_long} %H h %M mn %S s", "%A %d %B %EY, %{feast_long} %H h %M mn %S s",
+ "%H h %M mn %S s %A %d %B %EY, %{feast_long}", "%H h %M mn %S s %A %d %B %EY, %{feast_long}" ],
+ [ "long_datetime_format", "%A %d %B %EY %H:%M:%S", "%A %d %B %EY %H:%M:%S",
+ "%H:%M:%S %A %d %B %EY", "%H:%M:%S %A %d %B %EY" ],
+ [ "medium_datetime_format", "%a %d %b %Y %H:%M:%S", "%a %d %b %Y %H:%M:%S",
+ "%H:%M:%S %a %d %b %Y", "%H:%M:%S %a %d %b %Y" ],
+ [ "short_datetime_format", "%d/%m/%Y %H:%M", "%d/%m/%Y %H:%M",
+ "%H:%M %d/%m/%Y", "%H:%M %d/%m/%Y" ],
+ [ "default_datetime_format", "%a %d %b %Y %H:%M:%S", "%a %d %b %Y %H:%M:%S",
+ "%H:%M:%S %a %d %b %Y", "%H:%M:%S %a %d %b %Y" ],
[ "date_parts_order", "dmy", "dmy", ],
);
-printf "1..%d\n", 2 * @tests;
+printf "1..%d\n", 4 * @tests;
foreach (@tests) { check @$_ }
@@ -1,9 +1,40 @@
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Test script for DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2003, 2004, 2010, 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
#
# Checking the (lack of) support of time zones
# It is noon in Paris, several people around the world simultaneously want to know
# which time it is.
use DateTime::Calendar::FrenchRevolutionary;
use DateTime;
+use utf8;
+use strict;
+use warnings;
sub g2r {
my ($n, $date_r1, $tz) = @_;
@@ -28,7 +59,7 @@ my @tests = (["0211 07 29 5 00 00", "Europe/Paris"]
, ["0211 07 29 9 16 66", "Pacific/Auckland"] # 10 ABT hours, -416.67 d-minutes
, ["0211 07 29 0 00 00", "Pacific/Tahiti"] # -12 ABT hours, -500 d-minutes
, ["0211 07 28 9 58 33", "Pacific/Pago_Pago"] # -13 ABT hours, -541.67 d-minutes
- );
+ );
my $nb_tests = @tests;
my $n = 1;
@@ -1,4 +1,35 @@
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Test script for DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2003, 2004, 2010, 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
use DateTime::Calendar::FrenchRevolutionary;
+use utf8;
+use strict;
+use warnings;
#my $nb_tests = @tests;
@@ -162,23 +193,23 @@ else {
$d = DateTime::Calendar::FrenchRevolutionary->new( year => 8,
month => 2,
day => 18,
- locale => 'fr');
+ locale => 'fr');
my $event_fr = <<'EOF';
-18 Brumaire I. Prise de la ville de Tournay par les Français.
+18 Brumaire I Prise de la ville de Tournay par les Français.
18 Brumaire III Armée du Nord. Entrée triomphante des Français dans
Nimègue.
-18 Brumaire VIII. Coup d'état de Bonaparte : fin du Directoire, début du Consulat
+18 Brumaire VIII Coup d'état de Bonaparte : fin du Directoire, début du Consulat.
EOF
my $event_en = <<'EOF';
-18 Brumaire I. The French capture Tournay.
+18 Brumaire I The French capture Tournay.
18 Brumaire III Army of the North. Triumphant entry of the French
into Nimègue.
-18 Brumaire VIII. Bonaparte's coup: end of Directorate, beginning of Consulate
+18 Brumaire VIII Bonaparte's coup: end of Directorate, beginning of Consulate.
EOF
if ($d->on_date eq $event_fr) {
@@ -199,7 +230,7 @@ else {
$d = DateTime::Calendar::FrenchRevolutionary->new( year => 8,
month => 2,
day => 10,
- locale => 'fr');
+ locale => 'fr');
if ($d->on_date eq '') {
print "ok 16\n";
}
@@ -1,4 +1,35 @@
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Test script for DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
use DateTime::Calendar::FrenchRevolutionary;
+use utf8;
+use strict;
+use warnings;
#my $nb_tests = @tests;
@@ -0,0 +1,115 @@
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Test script for DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
+# Check the fix to RT ticket 100311
+# Generate a UTF-8 string and check its length, to be sure that it is generated
+# as an UTF-8 string and not a Mojibake ISO-8859 string.
+
+use utf8;
+use strict;
+use warnings;
+use DateTime::Calendar::FrenchRevolutionary;
+
+#my $nb_tests = @tests;
+my $n = 1;
+my $nb_tests = 11;
+
+print "1..$nb_tests\n";
+
+# "Octidi 08 Pluviôse, jour du Mézéréon"
+# and not "Octidi 08 Pluviôse, jour du Mézéréon"
+my $d1 = DateTime::Calendar::FrenchRevolutionary->new(year => 223, month => 5, day => 8, locale => 'fr');
+my $l = length($d1->month_name());
+if ($l == 8)
+ { print "ok 1\n" }
+else
+ { print "not ok 1, expected 8, actual ", $l, "\n" }
+
+$l = length($d1->feast_short);
+if ($l == 8)
+ { print "ok 2\n" }
+else
+ { print "not ok 2, expected 8, actual ", $l, "\n" }
+
+
+$l = length($d1->feast_long);
+if ($l == 16)
+ { print "ok 3\n" }
+else
+ { print "not ok 3, expected 16, actual ", $l, "\n" }
+
+$l = length($d1->feast_caps);
+if ($l == 16)
+ { print "ok 4\n" }
+else
+ { print "not ok 4, expected 16, actual ", $l, "\n" }
+
+$l = length($d1->strftime("%A %d %B, %Ej"));
+if ($l == 36)
+ { print "ok 5\n" }
+else
+ { print "not ok 5, expected 36, actual ", $l, "\n" }
+
+# "Décadi 10 Nivôse, jour du Fléau"
+# and not "Décadi 08 Nivôse, jour du Fléua"
+$d1 = DateTime::Calendar::FrenchRevolutionary->new(year => 223, month => 4, day => 10, locale => 'fr');
+$l = length($d1->day_name());
+if ($l == 6)
+ { print "ok 6\n" }
+else
+ { print "not ok 6, expected 6, actual ", $l, "\n" }
+
+$l = length($d1->month_name());
+if ($l == 6)
+ { print "ok 7\n" }
+else
+ { print "not ok 7, expected 6, actual ", $l, "\n" }
+
+$l = length($d1->feast_short);
+if ($l == 5)
+ { print "ok 8\n" }
+else
+ { print "not ok 8, expected 5, actual ", $l, "\n" }
+
+$l = length($d1->feast_long);
+if ($l == 13)
+ { print "ok 9\n" }
+else
+ { print "not ok 9, expected 13, actual ", $l, "\n" }
+
+$l = length($d1->feast_caps);
+if ($l == 13)
+ { print "ok 10\n" }
+else
+ { print "not ok 10, expected 13, actual ", $l, "\n" }
+
+$l = length($d1->strftime("%A %d %B, %Ej"));
+if ($l == 31)
+ { print "ok 11\n" }
+else
+ { print "not ok 11, expected 31, actual ", $l, "\n" }
@@ -1,3 +1,31 @@
+# -*- encoding: utf-8; indent-tabs-mode: nil -*-
+#
+# Test script for DateTime::Calendar::FrenchRevolutionary
+# Copyright (C) 2003, 2004, 2010, 2011, 2012, 2014 Jean Forget
+#
+# This program is distributed 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 F<LICENSE> file or at
+# L<http://www.perlfoundation.org/artistic_license_1_0>
+# and L<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/>.
+#
#
# Checking negative dates. What matters is only that you can convert *to*
# a negative revolutionary date and then *from* the same date and get
@@ -6,11 +34,14 @@
#
use DateTime::Calendar::FrenchRevolutionary;
use DateTime;
+use utf8;
+use strict;
+use warnings;
sub check {
my ($n, $y, $m, $d, $H, $M, $S) = @_;
my $date_g1 = DateTime->new(year => $y, month => $m, day => $d
- , hour => $H, minute => $M, second => $S);
+ , hour => $H, minute => $M, second => $S);
my $date_rev = DateTime::Calendar::FrenchRevolutionary->from_object(object => $date_g1);
my $date_g2 = DateTime->from_object(object => $date_rev);
if ($date_g1 eq $date_g2)
@@ -19,10 +50,10 @@ sub check {
{ print "not ok $n : expected $date_g1, got $date_g2\n" }
}
-@tests = ([1789, 7, 14, 16, 15, 0] # Storming of the Bastille
- , [1515, 9, 13, 8, 30, 0] # Battle of Marignan
- , [1792, 9, 21, 8, 30, 0] # 1 day before the DT-C-FR epoch
- , [1792, 9, 22, 8, 30, 0] # the DT-C-FR epoch
+my @tests = ([1789, 7, 14, 16, 15, 0] # Storming of the Bastille
+ , [1515, 9, 13, 8, 30, 0] # Battle of Marignan
+ , [1792, 9, 21, 8, 30, 0] # 1 day before the DT-C-FR epoch
+ , [1792, 9, 22, 8, 30, 0] # the DT-C-FR epoch
);
printf "1..%d\n", scalar @tests;
my $n = 1;