#!/usr/local/bin/perl -w # # Printing a French Revolutionary calendar # use DateTime::Calendar::FrenchRevolutionary; use Getopt::Long; use Roman; use strict; use FindBin; my $lang = 'en'; my $pict = undef; GetOptions('lang=s' => \$lang, 'kitten=s' => \$pict); # # I18N # my $ref_labels; if ($lang eq 'fr') { $ref_labels = do "$FindBin::Bin/labels_fr" } else { $ref_labels = do "$FindBin::Bin/labels_en" } my %labels = %$ref_labels; my $annee; foreach $annee (@ARGV) { warn "Invalid year", next if $annee <= 0; prt_cal ($annee); } sub prt_cal { my $year = $_[0]; # French revolutionary year my $year_1 = $year + 1791; # first corresponding Gregorian year my $year_2 = $year + 1792; # second corresponding Gregorian year # HTML header print <<"EOT";
\n) if $pict;
# Column headers for the first six months
print <<"EOT";
Vendémiaire $labels{month3}[8]-$labels{month3}[9] |
Brumaire $labels{month3}[9]-$labels{month3}[10] |
Frimaire $labels{month3}[10]-$labels{month3}[11] |
Nivôse $labels{month3}[11]-$labels{month3}[0] |
Pluviôse $labels{month3}[0]-$labels{month3}[1] |
Ventôse $labels{month3}[1]-$labels{month3}[2] |
| \n";
}
# Printing the first six months and the headers for the last six months
print <<"EOT";
Germinal $labels{month3}[2]-$labels{month3}[3] |
Floréal $labels{month3}[3]-$labels{month3}[4] |
Prairial $labels{month3}[4]-$labels{month3}[5] |
Messidor $labels{month3}[5]-$labels{month3}[6] |
Thermidor $labels{month3}[6]-$labels{month3}[7] |
Fructidor $labels{month3}[7]-$labels{month3}[8] |
| \n";
}
print "
| \n" }
print <<"EOT";
|||||
$labels{add_days} | |||||