Date-Convert-French_Rev

 view release on metacpan or  search on metacpan

eg/labels_fr  view on Meta::CPAN

# -*- encoding: utf-8; indent-tabs-mode: nil -*-
#
#     French speaking labels for g2r_table, r2g_table and prt_cal
#     Copyright (C) 2001, 2002, 2003, 2013, 2015, 2020 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<https://dev.perl.org/licenses/artistic.html>
#     and L<https://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., <https://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) ]
 , week1     => [ qw(L M M J V S D) ]
 , add_days  => 'Jours complémentaires'
 , month     => [ qw(Janvier Février Mars Avril Mai Juin Juillet Août Septembre
                 Octobre Novembre Décembre) ]
 , title1    => "Lettres pour une année"
 , 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"
);

#
# Formattage spécifique de la date grégorienne
# note : on n'utilise pas le quatrième paramètre d'appel.
#
$labels{format} = sub {
  my ($a, $m, $j) = @_;
  "$j $labels{month}[$m-1] $a"
};

#
# Mode d'emploi, Grégorien -> Républicain
#
$labels{usage1} =  <<'EOT';
<h3>Comment convertir $gr_date</h3>
<p>Regardez d'abord la première table. L'année grégorienne
<strong>$y</strong>
se trouve dans l'intervalle
<em>$begint&nbsp;-&nbsp;$end_of_interval{$begint}</em>
et elle se termine par les deux chiffres
<strong>$y2</strong>.
Dans la ligne et la colonne correspondantes, la case contient les trois lettres
<em>$word</em>.
<p>Regardez ensuite les trois tables suivantes.
<strong>$labels{month}[$m-1]</strong>
apparaît dans la table
<em>$labels{title2}{$part}</em>
qui comporte en en-tête la mention
<em>$labels{year_ttl}&nbsp;-&nbsp;$offset</em>.
Vous pouvez donc en déduire tout de suite l'année républicaine, qui est
<strong>$ryear</strong>.
Parmi ces trois lettres
<em>$word</em>,
la lettre
<em>$letter</em>
est celle qui apparaît dans la même table. La case correspondante contient les deux formules&nbsp;:
<em>@formulas</em>.
Choisissez celle qui convertit le jour
<strong>$d</strong>
en un nombre de 1 à 30. C'est-à-dire, jusqu'à
<strong>$limit $labels{month}[$m - 1]</strong>
inclus, utilisez la première formule
<em>$formulas[0]</em>,
et ultérieurement, utilisez la deuxième formule
<em>$formulas[1]</em>.
Dans le cas présent, le numéro du jour grégorien est
<strong>$d</strong>,
donc vous appliquez la formule



( run in 0.614 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )