Initial Windows agent repository

This commit is contained in:
Frank Harris 2026-06-08 10:45:20 -05:00
commit a0db0c2e5b
10589 changed files with 3844063 additions and 0 deletions

View file

@ -0,0 +1,210 @@
# Copyright (c) 1995-2009 Graham Barr. This program is free
# software; you can redistribute it and/or modify it under the same terms
# as Perl itself.
package Date::Format;
use strict;
require Exporter;
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Date formatting subroutines
use Date::Format::Generic;
our @ISA = qw(Exporter);
our @EXPORT = qw(time2str strftime ctime asctime);
sub time2str ($;$$$)
{
my ($fmt, $time, $zone, $lang) = @_;
my $pkg = defined $lang
? do { require Date::Language; Date::Language->new($lang) }
: 'Date::Format::Generic';
$pkg->time2str($fmt, $time, $zone);
}
sub strftime ($\@;$)
{
Date::Format::Generic->strftime(@_);
}
sub ctime ($;$)
{
my ($t,$tz) = @_;
Date::Format::Generic->time2str("%a %b %e %T %Y\n", $t, $tz);
}
sub asctime (\@;$)
{
my ($t,$tz) = @_;
Date::Format::Generic->strftime("%a %b %e %T %Y\n", $t, $tz);
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Format - Date formatting subroutines
=head1 VERSION
version 2.35
=head1 SYNOPSIS
use Date::Format;
my @lt = localtime(time);
my $template = "....";
print time2str($template, time);
print strftime($template, @lt);
my $zone;
print time2str($template, time, $zone);
print strftime($template, @lt, $zone);
print ctime(time);
print asctime(@lt);
print ctime(time, $zone);
print asctime(@lt, $zone);
=head1 DESCRIPTION
This module provides routines to format dates into ASCII strings. They
correspond to the C library routines C<strftime> and C<ctime>.
=over 4
=item time2str(TEMPLATE, TIME [, ZONE [, LANGUAGE]])
C<time2str> converts C<TIME> into an ASCII string using the conversion
specification given in C<TEMPLATE>. C<ZONE> if given specifies the zone
which the output is required to be in, C<ZONE> defaults to your current zone.
C<LANGUAGE> if given specifies the language for day and month names
(e.g. C<'German'>, C<'French'>); defaults to C<'English'>.
=item strftime(TEMPLATE, TIME [, ZONE])
C<strftime> is similar to C<time2str> with the exception that the time is
passed as an array, such as the array returned by C<localtime>.
=item ctime(TIME [, ZONE])
C<ctime> calls C<time2str> with the given arguments using the
conversion specification C<"%a %b %e %T %Y\n">
=item asctime(TIME [, ZONE])
C<asctime> calls C<time2str> with the given arguments using the
conversion specification C<"%a %b %e %T %Y\n">
=back
=head1 NAME
Date::Format - Date formatting subroutines
=head1 MULTI-LANGUAGE SUPPORT
Date::Format is capable of formatting into several languages. You can
pass an optional language name directly to C<time2str>:
time2str("%a %b %e %T %Y\n", time, undef, 'German');
time2str("%a %b %e %T %Y\n", time, 'GMT', 'French');
Alternatively, create a language-specific object and call methods on it,
see L<Date::Language>:
my $lang = Date::Language->new('German');
$lang->time2str("%a %b %e %T %Y\n", time);
=head1 CONVERSION SPECIFICATION
Each conversion specification is replaced by appropriate
characters as described in the following list. The
appropriate characters are determined by the LC_TIME
category of the program's locale.
%% PERCENT
%a day of the week abbr
%A day of the week
%b month abbr
%B month
%c MM/DD/YY HH:MM:SS
%C ctime format: Sat Nov 19 21:05:57 1994
%d numeric day of the month, with leading zeros (eg 01..31)
%e like %d, but a leading zero is replaced by a space (eg 1..32)
%D MM/DD/YY
%G GPS week number (weeks since January 6, 1980)
%h month abbr
%H hour, 24 hour clock, leading 0's)
%I hour, 12 hour clock, leading 0's)
%j day of the year
%k hour
%l hour, 12 hour clock
%L month number, starting with 1
%m month number, starting with 01
%M minute, leading 0's
%n NEWLINE
%o ornate day of month -- "1st", "2nd", "25th", etc.
%p AM or PM
%P am or pm (Yes %p and %P are backwards :)
%q Quarter number, starting with 1
%r time format: 09:05:57 PM
%R time format: 21:05
%s seconds since the Epoch, UCT
%S seconds, leading 0's
%t TAB
%T time format: 21:05:57
%U week number, Sunday as first day of week
%w day of the week, numerically, Sunday == 0
%W week number, Monday as first day of week
%x date format: 11/19/94
%X time format: 21:05:57
%y year (2 digits)
%Y year (4 digits)
%Z timezone in ascii. eg: PST
%z timezone in format -/+0000
C<%d>, C<%e>, C<%H>, C<%I>, C<%j>, C<%k>, C<%l>, C<%m>, C<%M>, C<%q>,
C<%y> and C<%Y> can be output in Roman numerals by prefixing the letter
with C<O>, e.g. C<%OY> will output the year as roman numerals.
=head1 LIMITATION
The functions in this module are limited to the time range that can be
represented by the time_t data type, i.e. 1901-12-13 20:45:53 GMT to
2038-01-19 03:14:07 GMT.
=head1 AUTHOR
Graham Barr <gbarr@pobox.com>
=head1 COPYRIGHT
Copyright (c) 1995-2009 Graham Barr. This program is free
software; you can redistribute it and/or modify it under the same terms
as Perl itself.
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,264 @@
##
##
##
package Date::Format::Generic;
use strict;
use warnings;
our ($epoch, $tzname);
use Time::Zone;
use Time::Local;
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Date formatting subroutines
sub ctime
{
my($me,$t,$tz) = @_;
$me->time2str("%a %b %e %T %Y\n", $t, $tz);
}
sub asctime
{
my($me,$t,$tz) = @_;
$me->strftime("%a %b %e %T %Y\n", $t, $tz);
}
sub _subs
{
my $fn;
$_[1] =~ s/
%(O?[%a-zA-Z])
/
($_[0]->can("format_$1") || sub { $1 })->($_[0]);
/sgeox;
$_[1];
}
sub strftime
{
my($pkg,$fmt,$time);
($pkg,$fmt,$time,$tzname) = @_;
my $me = ref($pkg) ? $pkg : bless [];
if(defined $tzname)
{
$tzname = uc $tzname;
$tzname = sprintf("%+05d",$tzname)
unless($tzname =~ /\D/);
$epoch = timelocal(@{$time}[0..5]);
@$me = gmtime($epoch + tz_offset($tzname));
}
else
{
@$me = @$time;
undef $epoch;
}
_subs($me,$fmt);
}
sub time2str
{
my($pkg,$fmt,$time);
($pkg,$fmt,$time,$tzname) = @_;
my $me = ref($pkg) ? $pkg : bless [], $pkg;
$epoch = $time;
if(defined $tzname)
{
$tzname = uc $tzname;
$tzname = sprintf("%+05d",$tzname)
unless($tzname =~ /\D/);
$time += tz_offset($tzname);
@$me = gmtime($time);
}
else
{
@$me = localtime($time);
}
$me->[9] = $time;
_subs($me,$fmt);
}
my(@DoW,@MoY,@DoWs,@MoYs,@AMPM,%format,@Dsuf);
@DoW = qw(Sunday Monday Tuesday Wednesday Thursday Friday Saturday);
@MoY = qw(January February March April May June
July August September October November December);
@DoWs = map { substr($_,0,3) } @DoW;
@MoYs = map { substr($_,0,3) } @MoY;
@AMPM = qw(AM PM);
@Dsuf = (qw(th st nd rd th th th th th th)) x 3;
@Dsuf[11,12,13] = qw(th th th);
@Dsuf[30,31] = qw(th st);
%format = ('x' => "%m/%d/%y",
'C' => "%a %b %e %T %Z %Y",
'X' => "%H:%M:%S",
);
my @locale;
my $locale = "/usr/share/lib/locale/LC_TIME/default";
local *LOCALE;
if(open(LOCALE,"$locale"))
{
chop(@locale = <LOCALE>);
close(LOCALE);
@MoYs = @locale[0 .. 11];
@MoY = @locale[12 .. 23];
@DoWs = @locale[24 .. 30];
@DoW = @locale[31 .. 37];
@format{"X","x","C"} = @locale[38 .. 40];
@AMPM = @locale[41 .. 42];
}
sub wkyr {
my($wstart, $wday, $yday) = @_;
$wday = ($wday + 7 - $wstart) % 7;
return int(($yday - $wday + 13) / 7 - 1);
}
##
## these 6 formatting routines need to be *copied* into the language
## specific packages
##
my @roman = ('',qw(I II III IV V VI VII VIII IX));
sub roman {
my $n = shift;
$n =~ s/(\d)$//;
my $r = $roman[ $1 ];
if($n =~ s/(\d)$//) {
(my $t = $roman[$1]) =~ tr/IVX/XLC/;
$r = $t . $r;
}
if($n =~ s/(\d)$//) {
(my $t = $roman[$1]) =~ tr/IVX/CDM/;
$r = $t . $r;
}
if($n =~ s/(\d)$//) {
(my $t = $roman[$1]) =~ tr/IVX/M../;
$r = $t . $r;
}
$r;
}
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
sub format_P { lc($_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0]) }
sub format_d { sprintf("%02d",$_[0]->[3]) }
sub format_e { sprintf("%2d",$_[0]->[3]) }
sub format_H { sprintf("%02d",$_[0]->[2]) }
sub format_I { sprintf("%02d",$_[0]->[2] % 12 || 12)}
sub format_j { sprintf("%03d",$_[0]->[7] + 1) }
sub format_k { sprintf("%2d",$_[0]->[2]) }
sub format_l { sprintf("%2d",$_[0]->[2] % 12 || 12)}
sub format_L { $_[0]->[4] + 1 }
sub format_m { sprintf("%02d",$_[0]->[4] + 1) }
sub format_M { sprintf("%02d",$_[0]->[1]) }
sub format_q { sprintf("%01d",int($_[0]->[4] / 3) + 1) }
sub format_s {
$epoch = timelocal(@{$_[0]}[0..5])
unless defined $epoch;
sprintf("%d",$epoch)
}
sub format_S { sprintf("%02d",$_[0]->[0]) }
sub format_U { wkyr(0, $_[0]->[6], $_[0]->[7]) }
sub format_w { $_[0]->[6] }
sub format_W { wkyr(1, $_[0]->[6], $_[0]->[7]) }
sub format_y { sprintf("%02d",$_[0]->[5] % 100) }
sub format_Y { sprintf("%04d",$_[0]->[5] + 1900) }
sub format_Z {
my $o = tz_local_offset($_[0]->[9]);
defined $tzname ? $tzname : uc tz_name($o, $_[0]->[8]);
}
sub format_z {
my $t = $_[0]->[9];
my $o = defined $tzname ? tz_offset($tzname, $t) : tz_offset(undef,$t);
sprintf("%+03d%02d", int($o / 3600), int(abs($o) % 3600) / 60);
}
sub format_c { &format_x . " " . &format_X }
sub format_D { &format_m . "/" . &format_d . "/" . &format_y }
sub format_r { &format_I . ":" . &format_M . ":" . &format_S . " " . &format_p }
sub format_R { &format_H . ":" . &format_M }
sub format_T { &format_H . ":" . &format_M . ":" . &format_S }
sub format_t { "\t" }
sub format_n { "\n" }
sub format_o { sprintf("%2d%s",$_[0]->[3],$Dsuf[$_[0]->[3]]) }
sub format_x { my $f = $format{'x'}; _subs($_[0],$f); }
sub format_X { my $f = $format{'X'}; _subs($_[0],$f); }
sub format_C { my $f = $format{'C'}; _subs($_[0],$f); }
sub format_Od { roman(format_d(@_)) }
sub format_Oe { roman(format_e(@_)) }
sub format_OH { roman(format_H(@_)) }
sub format_OI { roman(format_I(@_)) }
sub format_Oj { roman(format_j(@_)) }
sub format_Ok { roman(format_k(@_)) }
sub format_Ol { roman(format_l(@_)) }
sub format_Om { roman(format_m(@_)) }
sub format_OM { roman(format_M(@_)) }
sub format_Oq { roman(format_q(@_)) }
sub format_Oy { roman(format_y(@_)) }
sub format_OY { roman(format_Y(@_)) }
sub format_G { int(($_[0]->[9] - 315993600) / 604800) }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Format::Generic - Date formatting subroutines
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,187 @@
package Date::Language;
use strict;
use Time::Local;
use Carp;
require Date::Format;
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Language specific date formatting and parsing
use base qw(Date::Format::Generic);
sub _build_lookups
{
my $pkg = caller;
no strict 'refs';
@{"${pkg}::MoY"}{@{"${pkg}::MoY"}} = (0 .. scalar(@{"${pkg}::MoY"}));
@{"${pkg}::MoY"}{@{"${pkg}::MoYs"}} = (0 .. scalar(@{"${pkg}::MoYs"}));
@{"${pkg}::DoW"}{@{"${pkg}::DoW"}} = (0 .. scalar(@{"${pkg}::DoW"}));
@{"${pkg}::DoW"}{@{"${pkg}::DoWs"}} = (0 .. scalar(@{"${pkg}::DoWs"}));
}
sub new
{
my $self = shift;
my $type = shift || $self;
$type =~ s/^(\w+)$/Date::Language::$1/;
croak "Bad language"
unless $type =~ /^[\w:]+$/;
eval "require $type"
or croak $@;
bless [], $type;
}
# Stop AUTOLOAD being called ;-)
sub DESTROY {}
sub AUTOLOAD
{
our $AUTOLOAD;
if($AUTOLOAD =~ /::strptime\Z/o)
{
my $self = $_[0];
my $type = ref($self) || $self;
require Date::Parse;
no strict 'refs';
*{"${type}::strptime"} = Date::Parse::gen_parser(
\%{"${type}::DoW"},
\%{"${type}::MoY"},
\@{"${type}::Dsuf"},
1);
goto &{"${type}::strptime"};
}
croak "Undefined method &$AUTOLOAD called";
}
sub format_Z {
my $tz = Date::Format::Generic::format_Z(@_);
my $pkg = ref($_[0]) || 'Date::Language';
no strict 'refs';
my $tz_map = \%{"${pkg}::TZ"};
return exists $tz_map->{$tz} ? $tz_map->{$tz} : $tz;
}
sub str2time
{
my $me = shift;
my @t = $me->strptime(@_);
return undef
unless @t;
my($ss,$mm,$hh,$day,$month,$year,$zone) = @t;
my @lt = localtime(time);
$hh ||= 0;
$mm ||= 0;
$ss ||= 0;
$month = $lt[4]
unless(defined $month);
$day = $lt[3]
unless(defined $day);
$year = ($month > $lt[4]) ? ($lt[5] - 1) : $lt[5]
unless(defined $year);
return defined $zone ? timegm($ss,$mm,$hh,$day,$month,$year) - $zone
: timelocal($ss,$mm,$hh,$day,$month,$year);
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language - Language specific date formatting and parsing
=head1 VERSION
version 2.35
=head1 SYNOPSIS
use Date::Language;
my $lang = Date::Language->new('German');
$lang->time2str("%a %b %e %T %Y\n", time);
=head1 DESCRIPTION
L<Date::Language> provides objects to parse and format dates for specific languages. Available languages are
Afar French Russian_cp1251
Amharic Gedeo Russian_koi8r
Austrian German Sidama
Brazilian Greek Somali
Chinese Hungarian Spanish
Chinese_GB Icelandic Swedish
Czech Italian Tigrinya
Danish Norwegian TigrinyaEritrean
Dutch Oromo TigrinyaEthiopian
English Romanian Turkish
Finnish Russian Bulgarian
Occitan
=head1 NAME
Date::Language - Language specific date formatting and parsing
=head1 METHODS
=over
=item time2str
See L<Date::Format/time2str>
=item strftime
See L<Date::Format/strftime>
=item ctime
See L<Date::Format/ctime>
=item asctime
See L<Date::Format/asctime>
=item str2time
See L<Date::Parse/str2time>
=item strptime
See L<Date::Parse/strptime>
=back
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,79 @@
##
## Afar tables
##
package Date::Language::Afar;
use strict;
use warnings;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Afar localization for Date::Format
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
@DoW = qw(Acaada Etleeni Talaata Arbaqa Kamiisi Gumqata Sabti);
@MoY = (
"Qunxa Garablu",
"Kudo",
"Ciggilta Kudo",
"Agda Baxis",
"Caxah Alsa",
"Qasa Dirri",
"Qado Dirri",
"Liiqen",
"Waysu",
"Diteli",
"Ximoli",
"Kaxxa Garablu"
);
@DoWs = map { substr($_,0,3) } @DoW;
@MoYs = map { substr($_,0,3) } @MoY;
@AMPM = qw(saaku carra);
@Dsuf = (qw(th st nd rd th th th th th th)) x 3;
@Dsuf[11,12,13] = qw(th th th);
@Dsuf[30,31] = qw(th st);
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Afar - Afar localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,117 @@
##
## Amharic tables
##
package Date::Language::Amharic;
use strict;
use warnings;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Amharic localization for Date::Format
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
if ( $] >= 5.006 ) {
@DoW = (
"\x{12a5}\x{1211}\x{12f5}",
"\x{1230}\x{129e}",
"\x{121b}\x{12ad}\x{1230}\x{129e}",
"\x{1228}\x{1261}\x{12d5}",
"\x{1210}\x{1219}\x{1235}",
"\x{12d3}\x{122d}\x{1265}",
"\x{1245}\x{12f3}\x{121c}"
);
@MoY = (
"\x{1303}\x{1295}\x{12e9}\x{12c8}\x{122a}",
"\x{134c}\x{1265}\x{1229}\x{12c8}\x{122a}",
"\x{121b}\x{122d}\x{127d}",
"\x{12a4}\x{1355}\x{1228}\x{120d}",
"\x{121c}\x{12ed}",
"\x{1301}\x{1295}",
"\x{1301}\x{120b}\x{12ed}",
"\x{12a6}\x{1308}\x{1235}\x{1275}",
"\x{1234}\x{1355}\x{1274}\x{121d}\x{1260}\x{122d}",
"\x{12a6}\x{12ad}\x{1270}\x{12cd}\x{1260}\x{122d}",
"\x{1296}\x{126c}\x{121d}\x{1260}\x{122d}",
"\x{12f2}\x{1234}\x{121d}\x{1260}\x{122d}"
);
@DoWs = map { substr($_,0,3) } @DoW;
@MoYs = map { substr($_,0,3) } @MoY;
@AMPM = ( "\x{1320}\x{12cb}\x{1275}", "\x{12a8}\x{1230}\x{12d3}\x{1275}" );
@Dsuf = ("\x{129b}" x 31);
}
else {
@DoW = (
"እሑድ",
"ሰኞ",
"ማክሰኞ",
"ረቡዕ",
"ሐሙስ",
"ዓርብ",
"ቅዳሜ"
);
@MoY = (
"ጃንዩወሪ",
"ፌብሩወሪ",
"ማርች",
"ኤፕረል",
"ሜይ",
"ጁን",
"ጁላይ",
"ኦገስት",
"ሴፕቴምበር",
"ኦክተውበር",
"ኖቬምበር",
"ዲሴምበር"
);
@DoWs = map { substr($_,0,9) } @DoW;
@MoYs = map { substr($_,0,9) } @MoY;
@AMPM = ( "ጠዋት", "ከሰዓት" );
@Dsuf = ("ኛ" x 31);
}
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Amharic - Amharic localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,61 @@
package Date::Language::Arabic;
use strict;
use warnings;
use utf8;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Arabic localization for Date::Format
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
@DoW = qw(الأحد الاثنين الثلاثاء الأربعاء الخميس الجمعة السبت);
@MoY = qw(يناير فبراير مسيرة أبريل مايو يونيو يوليو أغسطس سبتمبر أكتوبر نوفمبر ديسمبر);
@DoWs = map { substr($_,0,3) } @DoW;
@MoYs = map { substr($_,0,3) } @MoY;
$MoYs[6] = 'يوليو';
@AMPM = qw(صباحا مساءا);
@Dsuf = ((qw(er e e e e e e e e e)) x 3, 'er'); #To be amended
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Arabic - Arabic localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,78 @@
##
## Austrian tables
##
package Date::Language::Austrian;
use strict;
use warnings;
use utf8;
use Date::Language ();
use Date::Language::English ();
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Austrian localization for Date::Format
use base 'Date::Language';
our @MoY = qw(Jänner Feber März April Mai Juni
Juli August September Oktober November Dezember);
our @MoYs = qw(Jän Feb Mär Apr Mai Jun Jul Aug Sep Oct Nov Dez);
our @DoW = qw(Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag);
our @DoWs = qw(So Mo Di Mi Do Fr Sa);
our @AMPM = @{Date::Language::English::AMPM};
our @Dsuf = @{Date::Language::English::Dsuf};
our ( %MoY, %DoW );
Date::Language::_build_lookups();
# Timezone abbreviation translations (English → German, same as German locale)
our %TZ = (
'CET' => 'MEZ', # Mitteleuropäische Zeit
'CEST' => 'MESZ', # Mitteleuropäische Sommerzeit
'WET' => 'WEZ', # Westeuropäische Zeit
'WEST' => 'WESZ', # Westeuropäische Sommerzeit
'EET' => 'OEZ', # Osteuropäische Zeit
'EEST' => 'OESZ', # Osteuropäische Sommerzeit
);
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Austrian - Austrian localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,66 @@
##
## Brazilian tables, contributed by Christian Tosta (tosta@cce.ufmg.br)
##
package Date::Language::Brazilian;
use strict;
use warnings;
use utf8;
use Date::Language ();
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Brazilian localization for Date::Format
use base 'Date::Language';
our @DoW = qw(Domingo Segunda Terça Quarta Quinta Sexta Sábado);
our @MoY = qw(Janeiro Fevereiro Março Abril Maio Junho
Julho Agosto Setembro Outubro Novembro Dezembro);
our @DoWs = map { substr($_,0,3) } @DoW;
our @MoYs = map { substr($_,0,3) } @MoY;
our @AMPM = qw(AM PM);
our @Dsuf = (qw(mo ro do ro to to to mo vo no)) x 3;
our ( %MoY, %DoW );
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Brazilian - Brazilian localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,113 @@
##
## Bulgarian tables contributed by Krasimir Berov
##
package Date::Language::Bulgarian;
use strict;
use warnings;
use utf8;
use base qw(Date::Language);
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Bulgarian localization for Date::Format
@DoW = qw(неделя понеделник вторник сряда четвъртък петък събота);
@MoY = qw(януари февруари март април май юни
юли август септември октомври ноември декември);
@DoWs = qw(нд пн вт ср чт пт сб);
@MoYs = map { substr($_,0,3) } @MoY;
@AMPM = qw(AM PM);
@Dsuf = (qw(ти ви ри ти ти ти ти ми ми ти)) x 3;
@Dsuf[11,12,13] = qw(ти ти ти);
@Dsuf[30,31] = qw(ти ви);
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
sub format_o { ($_[0]->[3]<10?' ':'').$_[0]->[3].$Dsuf[$_[0]->[3]] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Bulgarian - Bulgarian localization for Date::Format
=head1 VERSION
version 2.35
=head1 SYNOPSIS
use strict;
use warnings;
use Date::Language;
local $\=$/;
my $template ='%a %b %e %T %Y (%Y-%m-%d %H:%M:%S)';
my $time=1290883821; #or just use time();
my @lt = localtime($time);
my %languages = qw(English GMT German EEST Bulgarian EET);
binmode(select,':utf8');
foreach my $l(keys %languages){
my $lang = Date::Language->new($l);
my $zone = $languages{$l};
print $/. "$l $zone";
print $lang->time2str($template, $time);
print $lang->time2str($template, $time, $zone);
print $lang->strftime($template, \@lt);
}
=head1 DESCRIPTION
This is Bulgarian localization for Date::Format.
It is important to note that this module source code is in utf8.
All strings which it outputs are in utf8, so it is safe to use it
currently only with English. You are left alone to try and convert
the output when using different Date::Language::* in the same application.
This should be addresed in the future.
=head1 NAME
Date::Language::Bulgarian - localization for Date::Format
=head1 AUTHOR
Krasimir Berov (berov@cpan.org)
=head1 COPYRIGHT
Copyright (c) 2010 Krasimir Berov. This program is free
software; you can redistribute it and/or modify it under the same terms
as Perl itself.
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,67 @@
##
## English tables
##
package Date::Language::Chinese;
use strict;
use warnings;
use utf8;
use Date::Language ();
use base qw(Date::Language);
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Chinese localization for Date::Format
our @DoW = qw(星期日 星期一 星期二 星期三 星期四 星期五 星期六);
our @MoY = qw(一月 二月 三月 四月 五月 六月
七月 八月 九月 十月 十一月 十二月);
our @DoWs = map { $_ } @DoW;
our @MoYs = map { $_ } @MoY;
our @AMPM = qw(上午 下午);
our @Dsuf = (qw(日 日 日 日 日 日 日 日 日 日)) x 3;
our ( %MoY, %DoW );
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
sub format_o { sprintf("%2d%s",$_[0]->[3],"日") }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Chinese - Chinese localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,94 @@
##
## Chinese GB2312 tables (GB2312 byte encoding)
##
package Date::Language::Chinese_GB;
use strict;
use warnings;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Chinese localization for Date::Format (GB2312)
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
@DoW = (
"\xd0\xc7\xc6\xda\xc8\xd5", # 星期日
"\xd0\xc7\xc6\xda\xd2\xbb", # 星期一
"\xd0\xc7\xc6\xda\xb6\xfe", # 星期二
"\xd0\xc7\xc6\xda\xc8\xfd", # 星期三
"\xd0\xc7\xc6\xda\xcb\xc4", # 星期四
"\xd0\xc7\xc6\xda\xce\xe5", # 星期五
"\xd0\xc7\xc6\xda\xc1\xf9", # 星期六
);
@MoY = (
"\xd2\xbb\xd4\xc2", # 一月
"\xb6\xfe\xd4\xc2", # 二月
"\xc8\xfd\xd4\xc2", # 三月
"\xcb\xc4\xd4\xc2", # 四月
"\xce\xe5\xd4\xc2", # 五月
"\xc1\xf9\xd4\xc2", # 六月
"\xc6\xdf\xd4\xc2", # 七月
"\xb0\xcb\xd4\xc2", # 八月
"\xbe\xc5\xd4\xc2", # 九月
"\xca\xae\xd4\xc2", # 十月
"\xca\xae\xd2\xbb\xd4\xc2", # 十一月
"\xca\xae\xb6\xfe\xd4\xc2", # 十二月
);
@DoWs = map { $_ } @DoW;
@MoYs = map { $_ } @MoY;
@AMPM = (
"\xc9\xcf\xce\xe7", # 上午
"\xcf\xc2\xce\xe7", # 下午
);
@Dsuf = ("\xc8\xd5") x 31; # 日
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
sub format_o { sprintf("%2d%s",$_[0]->[3],"\xc8\xd5") } # 日
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Chinese_GB - Chinese localization for Date::Format (GB2312)
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,89 @@
##
## Czech tables
##
## Contributed by Honza Pazdziora
package Date::Language::Czech;
use strict;
use warnings;
use utf8;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Czech localization for Date::Format
our @MoY = qw(leden únor bøezen duben kvìten èerven èervenec srpen záøí
øíjen listopad prosinec);
our @MoYs = qw(led únor bøe dub kvì èvn èec srp záøí øíj lis pro);
our @MoY2 = @MoY;
for (@MoY2)
{ s!en$!na! or s!ec$!ce! or s!ad$!adu! or s!or$!ora!; }
our @DoW = qw(nedìle pondìlí úterý støeda ètvrtek pátek sobota);
our @DoWs = qw(Ne Po Út St Èt Pá So);
our @AMPM = qw(dop. odp.);
our ( %MoY, %DoW );
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
sub format_d { $_[0]->[3] }
sub format_m { $_[0]->[4] + 1 }
sub format_o { $_[0]->[3] . '.' }
sub format_Q { $MoY2[$_[0]->[4]] }
sub time2str {
my $ref = shift;
my @a = @_;
$a[0] =~ s/(%[do]\.?\s?)%B/$1%Q/;
$ref->SUPER::time2str(@a);
}
sub strftime {
my $ref = shift;
my @a = @_;
$a[0] =~ s/(%[do]\.?\s?)%B/$1%Q/;
$ref->SUPER::time2str(@a);
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Czech - Czech localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,67 @@
##
## Danish tables
##
package Date::Language::Danish;
use strict;
use warnings;
use utf8;
use Date::Language ();
use base 'Date::Language';
use Date::Language::English ();
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Danish localization for Date::Format
our @MoY = qw(Januar Februar Marts April Maj Juni
Juli August September Oktober November December);
our @MoYs = qw(Jan Feb Mar Apr Maj Jun Jul Aug Sep Okt Nov Dec);
our @DoW = qw(Søndag Mandag Tirsdag Onsdag Torsdag Fredag Lørdag);
our @DoWs = qw(Søn Man Tir Ons Tor Fre Lør);
our @AMPM = @{Date::Language::English::AMPM};
our @Dsuf = @{Date::Language::English::Dsuf};
our ( %MoY, %DoW );
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Danish - Danish localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,69 @@
##
## Dutch tables
## Contributed by Johannes la Poutre <jlpoutre@corp.nl.home.com>
##
package Date::Language::Dutch;
use strict;
use warnings;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Dutch localization for Date::Format
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
@MoY = qw(januari februari maart april mei juni juli
augustus september oktober november december);
@MoYs = map(substr($_, 0, 3), @MoY);
$MoYs[2] = 'mrt'; # mrt is more common (Frank Maas)
@DoW = map($_ . "dag", qw(zon maan dins woens donder vrij zater));
@DoWs = map(substr($_, 0, 2), @DoW);
# these aren't normally used...
@AMPM = qw(VM NM);
@Dsuf = ('e') x 31;
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
sub format_o { sprintf("%2de",$_[0]->[3]) }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Dutch - Dutch localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,66 @@
##
## English tables
##
package Date::Language::English;
use strict;
use warnings;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: English localization for Date::Format
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
@DoW = qw(Sunday Monday Tuesday Wednesday Thursday Friday Saturday);
@MoY = qw(January February March April May June
July August September October November December);
@DoWs = map { substr($_,0,3) } @DoW;
@MoYs = map { substr($_,0,3) } @MoY;
@AMPM = qw(AM PM);
@Dsuf = (qw(th st nd rd th th th th th th)) x 3;
@Dsuf[11,12,13] = qw(th th th);
@Dsuf[30,31] = qw(th st);
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::English - English localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,74 @@
##
## Finnish tables
## Contributed by Matthew Musgrove <muskrat@mindless.com>
## Corrected by roke
##
package Date::Language::Finnish;
use strict;
use warnings;
use utf8;
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Finnish localization for Date::Format
use Date::Language ();
# In Finnish, the names of the months and days are only capitalized at the beginning of sentences.
our @MoY = map($_ . "kuu", qw(tammi helmi maalis huhti touko kesä heinä elo syys loka marras joulu));
our @DoW = qw(sunnuntai maanantai tiistai keskiviikko torstai perjantai lauantai);
# it is not customary to use abbreviated names of months or days
# per Graham's suggestion:
our @MoYs = @MoY;
our @DoWs = @DoW;
# the short form of ordinals
our @Dsuf = ('.') x 31;
# doesn't look like this is normally used...
our @AMPM = qw(ap ip);
our ( %MoY, %DoW );
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
sub format_o { sprintf("%2de",$_[0]->[3]) }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Finnish - Finnish localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,67 @@
##
## French tables, contributed by Emmanuel Bataille (bem@residents.frmug.org)
##
package Date::Language::French;
use strict;
use warnings;
use utf8;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: French localization for Date::Format
our @DoW = qw(dimanche lundi mardi mercredi jeudi vendredi samedi);
our @MoY = qw(janvier février mars avril mai juin
juillet août septembre octobre novembre décembre);
our @DoWs = map { substr($_,0,3) } @DoW;
our @MoYs = map { substr($_,0,3) } @MoY;
$MoYs[6] = 'jul';
our @AMPM = qw(AM PM);
our @Dsuf = ('e', 'er', ('e') x 30);
our ( %MoY, %DoW );
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
sub format_o { sprintf("%2d%s",$_[0]->[3],$Dsuf[$_[0]->[3]]) }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::French - French localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,81 @@
##
## Gedeo tables
##
package Date::Language::Gedeo;
use strict;
use warnings;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Gedeo localization for Date::Format
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
@DoW = qw( Sanbbattaa Sanno Masano Roobe Hamusse Arbe Qiddamme);
@MoY = (
"Oritto",
"Birre'a",
"Onkkollessa",
"Saddasa",
"Arrasa",
"Qammo",
"Ella",
"Waacibajje",
"Canissa",
"Addolessa",
"Bittitotessa",
"Hegeya"
);
@DoWs = map { substr($_,0,3) } @DoW;
$DoWs[0] = "Snb";
$DoWs[1] = "Sno";
@MoYs = map { substr($_,0,3) } @MoY;
@AMPM = qw(gorsa warreti-udumma);
@Dsuf = (qw(th st nd rd th th th th th th)) x 3;
@Dsuf[11,12,13] = qw(th th th);
@Dsuf[30,31] = qw(th st);
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Gedeo - Gedeo localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,77 @@
##
## German tables
##
package Date::Language::German;
use strict;
use warnings;
use utf8;
use Date::Language::English ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: German localization for Date::Format
our @MoY = qw(Januar Februar März April Mai Juni
Juli August September Oktober November Dezember);
our @MoYs = qw(Jan Feb Mär Apr Mai Jun Jul Aug Sep Okt Nov Dez);
our @DoW = qw(Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag);
our @DoWs = qw(So Mo Di Mi Do Fr Sa);
our @AMPM = @{Date::Language::English::AMPM};
our @Dsuf = @{Date::Language::English::Dsuf};
our ( %MoY, %DoW );
Date::Language::_build_lookups();
# Timezone abbreviation translations (English → German)
our %TZ = (
'CET' => 'MEZ', # Mitteleuropäische Zeit
'CEST' => 'MESZ', # Mitteleuropäische Sommerzeit
'WET' => 'WEZ', # Westeuropäische Zeit
'WEST' => 'WESZ', # Westeuropäische Sommerzeit
'EET' => 'OEZ', # Osteuropäische Zeit
'EEST' => 'OESZ', # Osteuropäische Sommerzeit
);
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
sub format_o { sprintf("%2d.",$_[0]->[3]) }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::German - German localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,119 @@
##
## Greek tables
##
## Traditional date format is: DoW DD{eta} MoY Year (%A %o %B %Y)
##
## Matthew Musgrove <muskrat@mindless.com>
## Translations graciously provided by Menelaos Stamatelos <men@kwsn.net>
## This module returns unicode (utf8) encoded characters. You will need to
## take the necessary steps for this to display correctly.
##
package Date::Language::Greek;
use strict;
use warnings;
use utf8;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Greek localization for Date::Format
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
@DoW = (
"Κυριακή",
"Δευτέρα",
"Τρίτη",
"Τετάρτη",
"Πέμπτη",
"Παρασκευή",
"Σάββατο",
);
@MoY = (
"Ιανουαρίου",
"Φεβρουαρίου",
"Μαρτίου",
"Απριλίου",
"Μαΐου",
"Ιουνίου",
"Ιουλίου",
"Αυγούστου",
"Σεπτεμτου",
"Οκτωβρίου",
"Νοεμβρίου",
"Δεκεμβρίου",
);
@DoWs = (
"Κυ",
"Δε",
"Τρ",
"Τε",
"Πε",
"Πα",
"Σα",
);
@MoYs = (
"Ιαν",
"Φε",
"Μαρ",
"Απρ",
"Μα",
"Ιουν",
"Ιουλ",
"Αυγ",
"Σεπ",
"Οκ",
"Νο",
"Δε",
);
@AMPM = ("πμ", "μμ");
@Dsuf = ("η" x 31);
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_o { sprintf("%2d%s",$_[0]->[3],"η") }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Greek - Greek localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,116 @@
##
## Hungarian tables based on English
##
#
# This is a just-because-I-stumbled-across-it
# -and-my-wife-is-Hungarian release: if Graham or
# someone adds to docs to Date::Format, I'd be
# glad to correct bugs and extend as needed.
#
package Date::Language::Hungarian;
use strict;
use warnings;
use utf8;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Hungarian localization for Date::Format
our @DoW = qw(Vasárnap Hétfő Kedd Szerda Csütörtök Péntek Szombat);
our @MoY = qw(Január Február Március Április Május Június
Július Augusztus Szeptember Október November December);
our @DoWs = map { substr($_,0,3) } @DoW;
our @MoYs = map { substr($_,0,3) } @MoY;
our @AMPM = qw(DE. DU.);
# There is no 'th or 'nd in Hungarian, just a dot
our @Dsuf = (".") x 31;
our ( %MoY, %DoW );
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
sub format_P { lc($_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0]) }
sub format_o { $_[0]->[3].'.' }
sub format_D { &format_y . "." . &format_m . "." . &format_d }
sub format_y { sprintf("%02d",$_[0]->[5] % 100) }
sub format_d { sprintf("%02d",$_[0]->[3]) }
sub format_m { sprintf("%02d",$_[0]->[4] + 1) }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Hungarian - Hungarian localization for Date::Format
=head1 VERSION
version 2.35
=head1 SYNOPSIS
my $lang = Date::Language->new('Hungarian');
print $lang->time2str("%a %b %e %T %Y", time);
my @lt = localtime(time);
my $template = "%a %b %e %T %Y";
print $lang->time2str($template, time);
print $lang->strftime($template, @lt);
my $zone = "EST";
print $lang->time2str($template, time, $zone);
print $lang->strftime($template, @lt, $zone);
print $lang->ctime(time);
print $lang->asctime(@lt);
print $lang->ctime(time, $zone);
print $lang->asctime(@lt, $zone);
See L<Date::Format>.
=head1 NAME
Date::Language::Hungarian - Magyar format for Date::Format
=head1 AUTHOR
Paula Goddard (paula -at- paulacska -dot- com)
=head1 LICENCE
Made available under the same terms as Perl itself.
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,67 @@
##
## Icelandic tables
##
package Date::Language::Icelandic;
use strict;
use warnings;
use utf8;
use Date::Language ();
use base 'Date::Language';
use Date::Language::English ();
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Icelandic localization for Date::Format
our @MoY = qw(Janúar Febrúar Mars Apríl Maí Júni
Júli Ágúst September Október Nóvember Desember);
our @MoYs = qw(Jan Feb Mar Apr Maí Jún Júl Ágú Sep Okt Nóv Des);
our @DoW = qw(Sunnudagur Mánudagur Þriðjudagur Miðvikudagur Fimmtudagur Föstudagur Laugardagur);
our @DoWs = qw(Sun Mán Þri Mið Fim Fös Lau);
our @AMPM = @{Date::Language::English::AMPM};
our @Dsuf = @{Date::Language::English::Dsuf};
our ( %MoY, %DoW );
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Icelandic - Icelandic localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,65 @@
##
## Italian tables
##
package Date::Language::Italian;
use strict;
use warnings;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Italian localization for Date::Format
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
@MoY = qw(Gennaio Febbraio Marzo Aprile Maggio Giugno
Luglio Agosto Settembre Ottobre Novembre Dicembre);
@MoYs = qw(Gen Feb Mar Apr Mag Giu Lug Ago Set Ott Nov Dic);
@DoW = qw(Domenica Lunedi Martedi Mercoledi Giovedi Venerdi Sabato);
@DoWs = qw(Dom Lun Mar Mer Gio Ven Sab);
use Date::Language::English ();
@AMPM = @{Date::Language::English::AMPM};
@Dsuf = @{Date::Language::English::Dsuf};
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Italian - Italian localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,66 @@
##
## Norwegian tables
##
package Date::Language::Norwegian;
use strict;
use warnings;
use utf8;
use Date::Language ();
use base 'Date::Language';
use Date::Language::English ();
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Norwegian localization for Date::Format
our @MoY = qw(Januar Februar Mars April Mai Juni
Juli August September Oktober November Desember);
our @MoYs = qw(Jan Feb Mar Apr Mai Jun Jul Aug Sep Okt Nov Des);
our @DoW = qw(Søndag Mandag Tirsdag Onsdag Torsdag Fredag Lørdag);
our @DoWs = qw(Søn Man Tir Ons Tor Fre Lør);
our @AMPM = @{Date::Language::English::AMPM};
our @Dsuf = @{Date::Language::English::Dsuf};
our ( %MoY, %DoW );
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Norwegian - Norwegian localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,65 @@
##
## Occitan tables, contributed by Quentn PAGÈS
##
package Date::Language::Occitan;
use strict;
use warnings;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Occitan localization for Date::Format
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
@DoW = qw(dimenge diluns dimars dimècres dijòus divendres dissabte);
@MoY = qw(genièr febrièr març abrial mai junh
julhet agost setembre octòbre novembre decembre);
@DoWs = map { substr($_,0,3) } @DoW;
@MoYs = map { substr($_,0,3) } @MoY;
$MoYs[6] = 'jul';
@AMPM = qw(AM PM);
@Dsuf = ((qw(er e e e e e e e e e)) x 3, 'er');
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Occitan - Occitan localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,67 @@
##
## Oromo tables
##
package Date::Language::Oromo;
use strict;
use warnings;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Oromo localization for Date::Format
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
@DoW = qw(Dilbata Wiixata Qibxata Roobii Kamiisa Jimaata Sanbata);
@MoY = qw(Amajjii Guraandhala Bitooteessa Elba Caamsa Waxabajjii
Adooleessa Hagayya Fuulbana Onkololeessa Sadaasa Muddee);
@DoWs = map { substr($_,0,3) } @DoW;
@MoYs = map { substr($_,0,3) } @MoY;
@AMPM = qw(WD WB);
@Dsuf = (qw(th st nd rd th th th th th th)) x 3;
@Dsuf[11,12,13] = qw(th th th);
@Dsuf[30,31] = qw(th st);
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Oromo - Oromo localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,67 @@
##
## Portuguese tables
##
package Date::Language::Portuguese;
use strict;
use warnings;
use utf8;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Portuguese localization for Date::Format
our @DoW = qw(domingo segunda-feira terça-feira quarta-feira quinta-feira sexta-feira sábado);
our @MoY = qw(janeiro fevereiro março abril maio junho
julho agosto setembro outubro novembro dezembro);
our @DoWs = map { substr($_,0,3) } @DoW;
our @MoYs = map { substr($_,0,3) } @MoY;
our @AMPM = qw(AM PM);
our @Dsuf = ('º') x 32;
our ( %MoY, %DoW );
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_o { sprintf("%2d%s",$_[0]->[3],$Dsuf[$_[0]->[3]]) }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Portuguese - Portuguese localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,67 @@
##
## Italian tables
##
package Date::Language::Romanian;
use strict;
use warnings;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Romanian localization for Date::Format
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
@MoY = qw(ianuarie februarie martie aprilie mai iunie
iulie august septembrie octombrie noembrie decembrie);
@DoW = qw(duminica luni marti miercuri joi vineri sambata);
@DoWs = map { substr($_,0,3) } @DoW;
@MoYs = map { substr($_,0,3) } @MoY;
@AMPM = qw(AM PM);
@Dsuf = ('') x 31;
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Romanian - Romanian localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,151 @@
##
## Russian tables (KOI8-R byte encoding)
##
## Contributed by Danil Pismenny <dapi@mail.ru>
package Date::Language::Russian;
use strict;
use warnings;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Russian localization for Date::Format (KOI8-R)
our (@DoW, @DoWs, @MoY, @MoYs, @MoY2, @DoWs2, @AMPM, @Dsuf, %MoY, %DoW);
@MoY = (
"\xf1\xce\xd7\xc1\xd2\xd1", # Января
"\xe6\xc5\xd7\xd2\xc1\xcc\xd1", # Февраля
"\xed\xc1\xd2\xd4\xc1", # Марта
"\xe1\xd0\xd2\xc5\xcc\xd1", # Апреля
"\xed\xc1\xd1", # Мая
"\xe9\xc0\xce\xd1", # Июня
"\xe9\xc0\xcc\xd1", # Июля
"\xe1\xd7\xc7\xd5\xd3\xd4\xc1", # Августа
"\xf3\xc5\xce\xd4\xd1\xc2\xd2\xd1", # Сентября
"\xef\xcb\xd4\xd1\xc2\xd2\xd1", # Октября
"\xee\xcf\xd1\xc2\xd2\xd1", # Ноября
"\xe4\xc5\xcb\xc1\xc2\xd2\xd1", # Декабря
);
@MoY2 = (
"\xf1\xce\xd7\xc1\xd2\xd8", # Январь
"\xe6\xc5\xd7\xd2\xc1\xcc\xd8", # Февраль
"\xed\xc1\xd2\xd4", # Март
"\xe1\xd0\xd2\xc5\xcc\xd8", # Апрель
"\xed\xc1\xca", # Май
"\xe9\xc0\xce\xd8", # Июнь
"\xe9\xc0\xcc\xd8", # Июль
"\xe1\xd7\xc7\xd5\xd3\xd4", # Август
"\xf3\xc5\xce\xd4\xd1\xc2\xd2\xd8", # Сентябрь
"\xef\xcb\xd4\xd1\xc2\xd2\xd8", # Октябрь
"\xee\xcf\xd1\xc2\xd2\xd8", # Ноябрь
"\xe4\xc5\xcb\xc1\xc2\xd2\xd8", # Декабрь
);
@MoYs = (
"\xf1\xce\xd7", # Янв
"\xe6\xc5\xd7", # Фев
"\xed\xd2\xd4", # Мрт
"\xe1\xd0\xd2", # Апр
"\xed\xc1\xca", # Май
"\xe9\xc0\xce", # Июн
"\xe9\xc0\xcc", # Июл
"\xe1\xd7\xc7", # Авг
"\xf3\xc5\xce", # Сен
"\xef\xcb\xd4", # Окт
"\xee\xcf\xd1", # Ноя
"\xe4\xc5\xcb", # Дек
);
@DoW = (
"\xf0\xcf\xce\xc5\xc4\xc5\xcc\xd8\xce\xc9\xcb", # Понедельник
"\xf7\xd4\xcf\xd2\xce\xc9\xcb", # Вторник
"\xf3\xd2\xc5\xc4\xc1", # Среда
"\xfe\xc5\xd4\xd7\xc5\xd2\xc7", # Четверг
"\xf0\xd1\xd4\xce\xc9\xc3\xc1", # Пятница
"\xf3\xd5\xc2\xc2\xcf\xd4\xc1", # Суббота
"\xf7\xcf\xd3\xcb\xd2\xc5\xd3\xc5\xce\xd8\xc5", # Воскресенье
);
@DoWs = (
"\xf0\xce", # Пн
"\xf7\xd4", # Вт
"\xf3\xd2", # Ср
"\xfe\xd4", # Чт
"\xf0\xd4", # Пт
"\xf3\xc2", # Сб
"\xf7\xd3", # Вс
);
@DoWs2 = (
"\xf0\xce\xc4", # Пнд
"\xf7\xd4\xd2", # Втр
"\xf3\xd2\xc4", # Срд
"\xfe\xd4\xd7", # Чтв
"\xf0\xd4\xce", # Птн
"\xf3\xc2\xd4", # Сбт
"\xf7\xd3\xcb", # Вск
);
@AMPM = (
"\xc4\xd0", # дп
"\xd0\xd0", # пп
);
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
sub format_d { $_[0]->[3] }
sub format_m { $_[0]->[4] + 1 }
sub format_o { $_[0]->[3] . '.' }
sub format_Q { $MoY2[$_[0]->[4]] }
sub str2time {
my ($self,$value) = @_;
map {$value=~s/(\s|^)$DoWs2[$_](\s)/$DoWs[$_]$2/ig} (0..6);
$value=~s/(\s+|^)\xed\xc1\xd2(\s+)/$1\xed\xd2\xd4$2/;
return $self->SUPER::str2time($value);
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Russian - Russian localization for Date::Format (KOI8-R)
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,98 @@
##
## Russian cp1251 (CP1251 byte encoding)
##
package Date::Language::Russian_cp1251;
use strict;
use warnings;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Russian localization for Date::Format (CP1251)
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
@DoW = (
"\xc2\xee\xf1\xea\xf0\xe5\xf1\xe5\xed\xfc\xe5", # Воскресенье
"\xcf\xee\xed\xe5\xe4\xe5\xeb\xfc\xed\xe8\xea", # Понедельник
"\xc2\xf2\xee\xf0\xed\xe8\xea", # Вторник
"\xd1\xf0\xe5\xe4\xe0", # Среда
"\xd7\xe5\xf2\xe2\xe5\xf0\xe3", # Четверг
"\xcf\xff\xf2\xed\xe8\xf6\xe0", # Пятница
"\xd1\xf3\xe1\xe1\xee\xf2\xe0", # Суббота
);
@MoY = (
"\xdf\xed\xe2\xe0\xf0\xfc", # Январь
"\xd4\xe5\xe2\xf0\xe0\xeb\xfc", # Февраль
"\xcc\xe0\xf0\xf2", # Март
"\xc0\xef\xf0\xe5\xeb\xfc", # Апрель
"\xcc\xe0\xe9", # Май
"\xc8\xfe\xed\xfc", # Июнь
"\xc8\xfe\xeb\xfc", # Июль
"\xc0\xe2\xe3\xf3\xf1\xf2", # Август
"\xd1\xe5\xed\xf2\xff\xe1\xf0\xfc", # Сентябрь
"\xce\xea\xf2\xff\xe1\xf0\xfc", # Октябрь
"\xcd\xee\xff\xe1\xf0\xfc", # Ноябрь
"\xc4\xe5\xea\xe0\xe1\xf0\xfc", # Декабрь
);
@DoWs = (
"\xc2\xf1\xea", # Вск
"\xcf\xed\xe4", # Пнд
"\xc2\xf2\xf0", # Втр
"\xd1\xf0\xe4", # Срд
"\xd7\xf2\xe2", # Чтв
"\xcf\xf2\xed", # Птн
"\xd1\xe1\xf2", # Сбт
);
@MoYs = map { substr($_,0,3) } @MoY;
@AMPM = qw(AM PM);
@Dsuf = ('e') x 31;
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
sub format_o { sprintf("%2de",$_[0]->[3]) }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Russian_cp1251 - Russian localization for Date::Format (CP1251)
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,98 @@
##
## Russian koi8r (KOI8-R byte encoding)
##
package Date::Language::Russian_koi8r;
use strict;
use warnings;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Russian localization for Date::Format (KOI8-R variant)
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
@DoW = (
"\xf7\xcf\xd3\xcb\xd2\xc5\xd3\xc5\xce\xd8\xc5", # Воскресенье
"\xf0\xcf\xce\xc5\xc4\xc5\xcc\xd8\xce\xc9\xcb", # Понедельник
"\xf7\xd4\xcf\xd2\xce\xc9\xcb", # Вторник
"\xf3\xd2\xc5\xc4\xc1", # Среда
"\xfe\xc5\xd4\xd7\xc5\xd2\xc7", # Четверг
"\xf0\xd1\xd4\xce\xc9\xc3\xc1", # Пятница
"\xf3\xd5\xc2\xc2\xcf\xd4\xc1", # Суббота
);
@MoY = (
"\xf1\xce\xd7\xc1\xd2\xd8", # Январь
"\xe6\xc5\xd7\xd2\xc1\xcc\xd8", # Февраль
"\xed\xc1\xd2\xd4", # Март
"\xe1\xd0\xd2\xc5\xcc\xd8", # Апрель
"\xed\xc1\xca", # Май
"\xe9\xc0\xce\xd8", # Июнь
"\xe9\xc0\xcc\xd8", # Июль
"\xe1\xd7\xc7\xd5\xd3\xd4", # Август
"\xf3\xc5\xce\xd4\xd1\xc2\xd2\xd8", # Сентябрь
"\xef\xcb\xd4\xd1\xc2\xd2\xd8", # Октябрь
"\xee\xcf\xd1\xc2\xd2\xd8", # Ноябрь
"\xe4\xc5\xcb\xc1\xc2\xd2\xd8", # Декабрь
);
@DoWs = (
"\xf7\xd3\xcb", # Вск
"\xf0\xce\xc4", # Пнд
"\xf7\xd4\xd2", # Втр
"\xf3\xd2\xc4", # Срд
"\xfe\xd4\xd7", # Чтв
"\xf0\xd4\xce", # Птн
"\xf3\xc2\xd4", # Сбт
);
@MoYs = map { substr($_,0,3) } @MoY;
@AMPM = qw(AM PM);
@Dsuf = ('e') x 31;
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
sub format_o { sprintf("%2de",$_[0]->[3]) }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Russian_koi8r - Russian localization for Date::Format (KOI8-R variant)
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,67 @@
##
## Sidama tables
##
package Date::Language::Sidama;
use strict;
use warnings;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Sidama localization for Date::Format
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
@DoW = qw(Sambata Sanyo Maakisanyo Roowe Hamuse Arbe Qidaame);
@MoY = qw(January February March April May June
July August September October November December);
@DoWs = map { substr($_,0,3) } @DoW;
@MoYs = map { substr($_,0,3) } @MoY;
@AMPM = qw(soodo hawwaro);
@Dsuf = (qw(th st nd rd th th th th th th)) x 3;
@Dsuf[11,12,13] = qw(th th th);
@Dsuf[30,31] = qw(th st);
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Sidama - Sidama localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,92 @@
##
## Somali tables
##
package Date::Language::Somali;
use strict;
use warnings;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Somali localization for Date::Format
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
@DoW = qw(Axad Isniin Salaaso Arbaco Khamiis Jimco Sabti);
@MoY = (
"Bisha Koobaad",
"Bisha Labaad",
"Bisha Saddexaad",
"Bisha Afraad",
"Bisha Shanaad",
"Bisha Lixaad",
"Bisha Todobaad",
"Bisha Sideedaad",
"Bisha Sagaalaad",
"Bisha Tobnaad",
"Bisha Kow iyo Tobnaad",
"Bisha Laba iyo Tobnaad"
);
@DoWs = map { substr($_,0,3) } @DoW;
@MoYs = (
"Kob",
"Lab",
"Sad",
"Afr",
"Sha",
"Lix",
"Tod",
"Sid",
"Sag",
"Tob",
"KIT",
"LIT"
);
@AMPM = qw(SN GN);
@Dsuf = (qw(th st nd rd th th th th th th)) x 3;
@Dsuf[11,12,13] = qw(th th th);
@Dsuf[30,31] = qw(th st);
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Somali - Somali localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,65 @@
##
## Spanish tables
##
package Date::Language::Spanish;
use strict;
use warnings;
use utf8;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Spanish localization for Date::Format
our @DoW = qw(domingo lunes martes miércoles jueves viernes sábado);
our @MoY = qw(enero febrero marzo abril mayo junio
julio agosto septiembre octubre noviembre diciembre);
our @DoWs = map { substr($_,0,3) } @DoW;
our @MoYs = map { substr($_,0,3) } @MoY;
our @AMPM = qw(AM PM);
our @Dsuf = ((qw(ro do ro to to to mo vo no mo)) x 3, 'ro');
our ( %MoY, %DoW );
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Spanish - Spanish localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,67 @@
##
## Swedish tables
## Contributed by Matthew Musgrove <muskrat@mindless.com>
## Corrected by dempa
##
package Date::Language::Swedish;
use strict;
use warnings;
use base 'Date::Language';
use Date::Language::English ();
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Swedish localization for Date::Format
our @MoY = qw(januari februari mars april maj juni juli augusti september oktober november december);
our @MoYs = map { substr($_,0,3) } @MoY;
our @DoW = map($_ . "dagen", qw(sön mån tis ons tors fre lör));
our @DoWs = map { substr($_,0,2) } @DoW;
# the ordinals are not typically used in modern times
our @Dsuf = ('a' x 2, 'e' x 29);
our @AMPM = @{Date::Language::English::AMPM};
our ( %MoY, %DoW );
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
sub format_o { sprintf("%2de",$_[0]->[3]) }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Swedish - Swedish localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,88 @@
##
## Tigrinya tables
##
package Date::Language::Tigrinya;
use strict;
use warnings;
use Date::Language ();
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Tigrinya localization for Date::Format
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
@DoW = (
"\x{1230}\x{1295}\x{1260}\x{1275}",
"\x{1230}\x{1291}\x{12ed}",
"\x{1230}\x{1209}\x{1235}",
"\x{1228}\x{1261}\x{12d5}",
"\x{1213}\x{1219}\x{1235}",
"\x{12d3}\x{122d}\x{1262}",
"\x{1240}\x{12f3}\x{121d}"
);
@MoY = (
"\x{1303}\x{1295}\x{12e9}\x{12c8}\x{122a}",
"\x{134c}\x{1265}\x{1229}\x{12c8}\x{122a}",
"\x{121b}\x{122d}\x{127d}",
"\x{12a4}\x{1355}\x{1228}\x{120d}",
"\x{121c}\x{12ed}",
"\x{1301}\x{1295}",
"\x{1301}\x{120b}\x{12ed}",
"\x{12a6}\x{1308}\x{1235}\x{1275}",
"\x{1234}\x{1355}\x{1274}\x{121d}\x{1260}\x{122d}",
"\x{12a6}\x{12ad}\x{1270}\x{12cd}\x{1260}\x{122d}",
"\x{1296}\x{126c}\x{121d}\x{1260}\x{122d}",
"\x{12f2}\x{1234}\x{121d}\x{1260}\x{122d}"
);
@DoWs = map { substr($_,0,3) } @DoW;
@MoYs = map { substr($_,0,3) } @MoY;
@AMPM = (
"\x{1295}/\x{1230}",
"\x{12F5}/\x{1230}"
);
@Dsuf = ("\x{12ed}" x 31);
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Tigrinya - Tigrinya localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,121 @@
##
## Tigrinya-Eritrean tables
##
package Date::Language::TigrinyaEritrean;
use strict;
use warnings;
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: TigrinyaEritrean localization for Date::Format
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
if ( $] >= 5.006 ) {
@DoW = (
"\x{1230}\x{1295}\x{1260}\x{1275}",
"\x{1230}\x{1291}\x{12ed}",
"\x{1230}\x{1209}\x{1235}",
"\x{1228}\x{1261}\x{12d5}",
"\x{1213}\x{1219}\x{1235}",
"\x{12d3}\x{122d}\x{1262}",
"\x{1240}\x{12f3}\x{121d}"
);
@MoY = (
"\x{1303}\x{1295}\x{12e9}\x{12c8}\x{122a}",
"\x{134c}\x{1265}\x{1229}\x{12c8}\x{122a}",
"\x{121b}\x{122d}\x{127d}",
"\x{12a4}\x{1355}\x{1228}\x{120d}",
"\x{121c}\x{12ed}",
"\x{1301}\x{1295}",
"\x{1301}\x{120b}\x{12ed}",
"\x{12a6}\x{1308}\x{1235}\x{1275}",
"\x{1234}\x{1355}\x{1274}\x{121d}\x{1260}\x{122d}",
"\x{12a6}\x{12ad}\x{1270}\x{12cd}\x{1260}\x{122d}",
"\x{1296}\x{126c}\x{121d}\x{1260}\x{122d}",
"\x{12f2}\x{1234}\x{121d}\x{1260}\x{122d}"
);
@DoWs = map { substr($_,0,3) } @DoW;
@MoYs = map { substr($_,0,3) } @MoY;
@AMPM = (
"\x{1295}/\x{1230}",
"\x{12F5}/\x{1230}"
);
@Dsuf = ("\x{12ed}" x 31);
}
else {
@DoW = (
"ሰንበት",
"ሰኑይ",
"ሰሉስ",
"ረቡዕ",
"ሓሙስ",
"ዓርቢ",
"ቀዳም"
);
@MoY = (
"ጥሪ",
"ለካቲት",
"መጋቢት",
"ሚያዝያ",
"ግንቦት",
"ሰነ",
"ሓምለ",
"ነሓሰ",
"መስከረም",
"ጥቅምቲ",
"ሕዳር",
"ታሕሳስ"
);
@DoWs = map { substr($_,0,9) } @DoW;
@MoYs = map { substr($_,0,9) } @MoY;
@AMPM = (
"ን/ሰ",
"ድ/ሰ"
);
@Dsuf = ("ይ" x 31);
}
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::TigrinyaEritrean - TigrinyaEritrean localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,123 @@
##
## Tigrinya-Ethiopian tables
##
package Date::Language::TigrinyaEthiopian;
use strict;
use warnings;
use Date::Language ();
use base qw(Date::Language);
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: TigrinyaEthiopian localization for Date::Format
our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
if ( $] >= 5.006 ) {
@DoW = (
"\x{1230}\x{1295}\x{1260}\x{1275}",
"\x{1230}\x{1291}\x{12ed}",
"\x{1230}\x{1209}\x{1235}",
"\x{1228}\x{1261}\x{12d5}",
"\x{1213}\x{1219}\x{1235}",
"\x{12d3}\x{122d}\x{1262}",
"\x{1240}\x{12f3}\x{121d}"
);
@MoY = (
"\x{1303}\x{1295}\x{12e9}\x{12c8}\x{122a}",
"\x{134c}\x{1265}\x{1229}\x{12c8}\x{122a}",
"\x{121b}\x{122d}\x{127d}",
"\x{12a4}\x{1355}\x{1228}\x{120d}",
"\x{121c}\x{12ed}",
"\x{1301}\x{1295}",
"\x{1301}\x{120b}\x{12ed}",
"\x{12a6}\x{1308}\x{1235}\x{1275}",
"\x{1234}\x{1355}\x{1274}\x{121d}\x{1260}\x{122d}",
"\x{12a6}\x{12ad}\x{1270}\x{12cd}\x{1260}\x{122d}",
"\x{1296}\x{126c}\x{121d}\x{1260}\x{122d}",
"\x{12f2}\x{1234}\x{121d}\x{1260}\x{122d}"
);
@DoWs = map { substr($_,0,3) } @DoW;
@MoYs = map { substr($_,0,3) } @MoY;
@AMPM = (
"\x{1295}/\x{1230}",
"\x{12F5}/\x{1230}"
);
@Dsuf = ("\x{12ed}" x 31);
}
else {
@DoW = (
"ሰንበት",
"ሰኑይ",
"ሰሉስ",
"ረቡዕ",
"ሓሙስ",
"ዓርቢ",
"ቀዳም"
);
@MoY = (
"ጃንዩወሪ",
"ፌብሩወሪ",
"ማርች",
"ኤፕረል",
"ሜይ",
"ጁን",
"ጁላይ",
"ኦገስት",
"ሴፕቴምበር",
"ኦክተውበር",
"ኖቬምበር",
"ዲሴምበር"
);
@DoWs = map { substr($_,0,9) } @DoW;
@MoYs = map { substr($_,0,9) } @MoY;
@AMPM = (
"ን/ሰ",
"ድ/ሰ"
);
@Dsuf = ("ይ" x 31);
}
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[$_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[$_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::TigrinyaEthiopian - TigrinyaEthiopian localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,87 @@
#----------------------------------------------------#
#
# Turkish tables
# Burak Gürsoy <burak@cpan.org>
# Last modified: Sat Nov 15 20:28:32 2003
#
# use Date::Language;
# my $turkish = Date::Language->new('Turkish');
# print $turkish->time2str("%e %b %Y, %a %T\n", time);
# print $turkish->str2time("25 Haz 1996 21:09:55 +0100");
#----------------------------------------------------#
package Date::Language::Turkish;
use strict;
use warnings;
use utf8;
use base 'Date::Language';
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Turkish localization for Date::Format
our @DoW = qw(Pazar Pazartesi Salı Çarşamba Perşembe Cuma Cumartesi);
our @MoY = qw(Ocak Şubat Mart Nisan Mayıs Haziran Temmuz Ağustos Eylül Ekim Kasım Aralık);
our @DoWs = map { substr($_,0,3) } @DoW;
$DoWs[1] = 'Pzt'; # Since we'll get two 'Paz' s
$DoWs[-1] = 'Cmt'; # Since we'll get two 'Cum' s
our @MoYs = map { substr($_,0,3) } @MoY;
our @AMPM = ('',''); # no am-pm thingy
# not easy as in english... maybe we can just use a dot "." ? :)
our %DsufMAP = (
(map {$_ => 'inci', $_+10 => 'inci', $_+20 => 'inci' } 1,2,5,8 ),
(map {$_ => 'nci', $_+10 => 'nci', $_+20 => 'nci' } 7 ),
(map {$_ => 'nci', $_+10 => 'nci', $_+20 => 'nci' } 2 ),
(map {$_ => 'üncü', $_+10 => 'üncü', $_+20 => 'üncü' } 3,4 ),
(map {$_ => 'uncu', $_+10 => 'uncu', $_+20 => 'uncu' } 9 ),
(map {$_ => 'ncı', $_+10 => 'ncı', $_+20 => 'ncı' } 6 ),
(map {$_ => 'uncu', } 10,30 ),
20 => 'nci',
31 => 'inci',
);
our @Dsuf = map{ $DsufMAP{$_} } sort {$a <=> $b} keys %DsufMAP;
our ( %MoY, %DoW );
Date::Language::_build_lookups();
# Formatting routines
sub format_a { $DoWs[$_[0]->[6]] }
sub format_A { $DoW[ $_[0]->[6]] }
sub format_b { $MoYs[$_[0]->[4]] }
sub format_B { $MoY[ $_[0]->[4]] }
sub format_h { $MoYs[$_[0]->[4]] }
sub format_p { '' } # disable
sub format_P { '' } # disable
sub format_o { sprintf("%2d%s",$_[0]->[3],$Dsuf[$_[0]->[3]-1]) }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Language::Turkish - Turkish localization for Date::Format
=head1 VERSION
version 2.35
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut

View file

@ -0,0 +1,477 @@
# Copyright (c) 1995-2009 Graham Barr. This program is free
# software; you can redistribute it and/or modify it under the same terms
# as Perl itself.
package Date::Parse;
require 5.000;
use strict;
use Time::Local;
use Carp;
use Time::Zone;
use Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(&strtotime &str2time &strptime);
our $VERSION = '2.35'; # VERSION: generated
# ABSTRACT: Parse date strings into time values
my %month = (
january => 0,
february => 1,
march => 2,
april => 3,
may => 4,
june => 5,
july => 6,
august => 7,
september => 8,
sept => 8,
october => 9,
november => 10,
december => 11,
);
my %day = (
sunday => 0,
monday => 1,
tuesday => 2,
tues => 2,
wednesday => 3,
wednes => 3,
thursday => 4,
thur => 4,
thurs => 4,
friday => 5,
saturday => 6,
);
my @suf = (qw(th st nd rd th th th th th th)) x 3;
@suf[11,12,13] = qw(th th th);
#Abbreviations
map { $month{substr($_,0,3)} = $month{$_} } keys %month;
map { $day{substr($_,0,3)} = $day{$_} } keys %day;
my $strptime = <<'ESQ';
my %month = map { lc $_ } %$mon_ref;
my $daypat = join("|", map { lc $_ } reverse sort keys %$day_ref);
my $monpat = join("|", reverse sort keys %month);
my $sufpat = join("|", reverse sort map { lc $_ } @$suf_ref);
my %ampm = (
'a' => 0, # AM
'p' => 12, # PM
);
my($AM, $PM) = (0,12);
sub {
my $dtstr = lc shift;
my $merid = 24;
my($century,$year,$month,$day,$hh,$mm,$ss,$zone,$dst,$frac);
$zone = tz_offset(shift) if @_;
1 while $dtstr =~ s#\([^\(\)]*\)# #o;
$dtstr =~ s#(\A|\n|\Z)# #sog;
# ignore day names
$dtstr =~ s#([\d\w\s])[\.\,]\s#$1 #sog;
$dtstr =~ s/(?<!\d),|,(?!\d)/ /g;
$dtstr =~ s#($daypat)\s*(den\s)?\b# #o;
# Time: 12:00 or 12:00:00 with optional am/pm
return unless $dtstr =~ /\S/;
# ISO compact: YYYYMMDD without delimiter (month and day must be exactly 2 digits)
if ($dtstr =~ s/\s(\d{4})(\d\d)(\d\d)(?:[-Tt ](\d\d?)(?:([-:]?)(\d\d?)(?:\5(\d\d?)(?:[.,](\d+))?)?)?)?(?=\D)/ /) {
($year,$month,$day,$hh,$mm,$ss,$frac) = ($1,$2-1,$3,$4,$6,$7,$8);
}
# Date with explicit delimiter: YYYY[-:]MM[-:]DD
elsif ($dtstr =~ s/\s(\d{4})([-:])(\d\d?)\2(\d\d?)(?:[-Tt ](\d\d?)(?:([-:]?)(\d\d?)(?:\6(\d\d?)(?:[.,](\d+))?)?)?)?(?=\D)/ /) {
($year,$month,$day,$hh,$mm,$ss,$frac) = ($1,$3-1,$4,$5,$7,$8,$9);
}
# default C++ boost timestamp is effectively %Y-%b-%d %H:%M:%S.%f
# details: https://svn.boost.org/trac/boost/ticket/8839
if ($dtstr =~ s/\s(\d{4})([-:]?)(\w{3,})\2(\d\d?)(?:[-Tt ](\d\d?)(?:([-:]?)(\d\d?)(?:\6(\d\d?)(?:[.,](\d+))?)?)?)?(?=\D)/ /) {
($year,$month,$day,$hh,$mm,$ss,$frac) = ($1,$month{$3},$4,$5,$7,$8,$9);
}
unless (defined $hh) {
if ($dtstr =~ s#[:\s](\d\d?):(\d\d?)(:(\d\d?)(?:\.\d+)?)?(z)?\s*(?:([ap])\.?m?\.?)?\s# #o) {
($hh,$mm,$ss) = ($1,$2,$4);
$zone = 0 if $5;
$merid = $ampm{$6} if $6;
}
# Time: 12 am
elsif ($dtstr =~ s#\s(\d\d?)\s*([ap])\.?m?\.?\s# #o) {
($hh,$mm,$ss) = ($1,0,0);
$merid = $ampm{$2};
}
}
if (defined $hh and $hh <= 12 and $dtstr =~ s# ([ap])\.?m?\.?\s# #o) {
$merid = $ampm{$1};
}
unless (defined $year) {
# Date: 12-June-96 (using - . or /)
if ($dtstr =~ s#\s(\d\d?)([\-\./])($monpat)(\2(\d\d+))?\s# #o) {
($month,$day) = ($month{$3},$1);
$year = $5 if $5;
}
# Date: 12-12-96 (using '-', '.' or '/' )
elsif ($dtstr =~ s#\s(\d+)([\-\./])(\d\d?)(\2(\d+))?\s# #o) {
($month,$day) = ($1 - 1,$3);
if ($5) {
$year = $5;
# Possible match for 1995-01-24 (short mainframe date format);
($year,$month,$day) = ($1, $3 - 1, $5) if $month > 12;
return if length($year) > 2 and $year < 1901;
}
}
elsif ($dtstr =~ s#\s(\d+)\s*($sufpat)?\s*($monpat)# #o) {
($month,$day) = ($month{$3},$1);
}
elsif ($dtstr =~ s#($monpat)\s*(\d+)\s*($sufpat)?\s# #o) {
$month = $month{$1};
if ($2 > 31) { $year = $2 } else { $day = $2 }
}
elsif ($dtstr =~ s#($monpat)([\/-])(\d+)[\/-]# #o) {
($month,$day) = ($month{$1},$3);
}
# Date: 961212 (YYMMDD — only consume if month is in range 1-12)
elsif ($dtstr =~ /\s(\d\d)(\d\d)(\d\d)\s/o && $2 >= 1 && $2 <= 12) {
$dtstr =~ s/\s(\d\d)(\d\d)(\d\d)\s/ /;
($year,$month,$day) = ($1,$2-1,$3);
}
$year = $1 if !defined($year) and $dtstr =~ s#\s(\d{2}(\d{2})?)[\s\.,]# #o;
}
# Zone
$dst = 1 if $dtstr =~ s#\bdst\b##o;
if ($dtstr =~ s#\s"?([a-z]{3,4})(dst|\d+[a-z]*|_[a-z]+)?"?\s# #o) {
$dst = 1 if $2 and $2 eq 'dst';
$zone = tz_offset($1);
return unless defined $zone;
}
elsif ($dtstr =~ s#\s([a-z]{3,4})?([\-\+]?)-?(\d\d?):?(\d\d)?(00)?\s# #o) {
my $m = defined($4) ? "$2$4" : 0;
my $h = "$2$3";
$zone = defined($1) ? tz_offset($1) : 0;
return unless defined $zone;
$zone += 60 * ($m + (60 * $h));
}
if ($dtstr =~ /\S/) {
# now for some dumb dates
if ($dtstr =~ s/^\s*(ut?|z)\s*$//) {
$zone = 0;
}
elsif ($dtstr =~ s#\s([a-z]{3,4})?([\-\+]?)-?(\d\d?)(\d\d)?(00)?\s# #o) {
my $m = defined($4) ? "$2$4" : 0;
my $h = "$2$3";
$zone = defined($1) ? tz_offset($1) : 0;
return unless defined $zone;
$zone += 60 * ($m + (60 * $h));
}
return if $dtstr =~ /\S/o;
}
if (defined $hh) {
if ($hh == 12) {
$hh = 0 if $merid == $AM;
}
elsif ($merid == $PM) {
$hh += 12;
}
}
if (defined $year && $year >= 100) {
$century = int($year / 100);
$year -= 1900;
}
$zone += 3600 if defined $zone && $dst;
$ss += "0.$frac" if $frac;
# Reject inputs that produced only a timezone with no date/time components.
# A bare number like '1' or '+0500' gets consumed by the timezone regex,
# leaving no meaningful date or time information — these are not valid dates.
return unless defined $hh || defined $mm || defined $ss
|| defined $day || defined $month || defined $year;
return ($ss,$mm,$hh,$day,$month,$year,$zone,$century);
}
ESQ
our ($day_ref, $mon_ref, $suf_ref, $obj);
sub gen_parser
{
local($day_ref,$mon_ref,$suf_ref,$obj) = @_;
if($obj)
{
my $obj_strptime = $strptime;
substr($obj_strptime,index($strptime,"sub")+6,0) = <<'ESQ';
shift; # package
ESQ
my $sub = eval "$obj_strptime" or die $@;
return $sub;
}
eval "$strptime" or die $@;
}
*strptime = gen_parser(\%day,\%month,\@suf);
sub str2time
{
my $now = @_ > 2 ? splice(@_, 2, 1) : time;
my @t = strptime(@_);
return undef
unless @t;
my($ss,$mm,$hh,$day,$month,$year,$zone, $century) = @t;
my @lt = localtime($now);
$hh ||= 0;
$mm ||= 0;
$ss ||= 0;
my $frac = $ss - int($ss);
$ss = int $ss;
$month = $lt[4]
unless(defined $month);
$day = $lt[3]
unless(defined $day);
unless (defined $year) {
my $is_future = $month > $lt[4]
|| ($month == $lt[4] && $day > $lt[3]);
$year = $is_future ? ($lt[5] - 1) : $lt[5];
}
# we were given a 4 digit year, so let's keep using those
$year += 1900 if defined $century;
# Normalize two-digit years to 4-digit before passing to Time::Local.
# Time::Local's own windowing varies across versions, so we do it ourselves.
# Convention: 69-99 -> 1969-1999, 0-68 -> 2000-2068 (POSIX strptime behavior).
# Note: first-century dates (years 1-99 AD) are not representable through
# str2time — same limitation as POSIX strptime.
$year += ($year >= 69 ? 1900 : 2000) if $year < 100;
return undef
unless($month <= 11 && $day >= 1 && $day <= 31
&& $hh <= 23 && $mm <= 59 && $ss <= 59);
my $result;
if (defined $zone) {
$result = eval {
local $SIG{__DIE__} = sub {}; # Ick!
timegm($ss,$mm,$hh,$day,$month,$year);
};
return undef
if !defined $result
or $result == -1
&& join("",$ss,$mm,$hh,$day,$month,$year)
ne "595923311169";
# Detect integer overflow: post-1970 dates must produce a non-negative epoch
return undef if $result < 0 && $year >= 1970;
$result -= $zone;
}
else {
$result = eval {
local $SIG{__DIE__} = sub {}; # Ick!
timelocal($ss,$mm,$hh,$day,$month,$year);
};
return undef
if !defined $result
or $result == -1
&& join("",$ss,$mm,$hh,$day,$month,$year)
ne join("",(localtime(-1))[0..5]);
# Detect integer overflow: post-1970 dates must produce a non-negative epoch
# Use 1971 to avoid false positives from timezone offsets near epoch 0
return undef if $result < 0 && $year >= 1971;
}
return $result + $frac;
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Date::Parse - Parse date strings into time values
=head1 VERSION
version 2.35
=head1 SYNOPSIS
use Date::Parse;
my $date = "Wed, 16 Jun 94 07:29:35 CST";
my $time = str2time($date);
my ($ss,$mm,$hh,$day,$month,$year,$zone) = strptime($date);
=head1 DESCRIPTION
C<Date::Parse> provides two routines for parsing date strings into time values.
=over 4
=item str2time(DATE [, ZONE [, EPOCH]])
C<str2time> parses C<DATE> and returns a unix time value, or undef upon failure.
C<ZONE>, if given, specifies the timezone to assume when parsing if the
date string does not specify a timezone.
C<EPOCH>, if given, is a unix epoch value used as the reference time when
filling in missing date components (month, day, or year). Defaults to
C<time()>. Useful when the current system clock cannot be trusted or when
parsing dates relative to a known reference point.
=item strptime(DATE [, ZONE])
C<strptime> takes the same arguments as str2time but returns an array of
values C<($ss,$mm,$hh,$day,$month,$year,$zone,$century)>. Elements are only
defined if they could be extracted from the date string. An empty array is
returned upon failure.
The return values follow the same conventions as Perl's built-in C<localtime>
and C<gmtime> functions:
=over 4
=item C<$month>
0-indexed: 0 = January, 1 = February, ..., 11 = December.
=item C<$year>
Years since 1900. For example, the year 2015 is returned as C<115>, and 1995
is returned as C<95>. To recover the full 4-digit year: C<$year + 1900>.
=item C<$zone>
Timezone offset in seconds from UTC, or C<undef> if no timezone was specified
in the input string.
=item C<$century>
Defined only when a 4-digit year was present in the input. Its value is
C<int($full_year / 100)> (e.g. C<20> for the year 2015). When C<$century> is
defined, C<$year + 1900> gives the original 4-digit year.
=back
For example, C<strptime("2015-01-24T09:08:17")> returns:
($ss, $mm, $hh, $day, $month, $year, $zone, $century)
( 17, 8, 9, 24, 0, 115, undef, 20 )
# ^--- January (0-indexed)
# ^--- 2015 - 1900
# ^--- not in input
# ^--- int(2015/100)
=back
=head1 NAME
Date::Parse - Parse date strings into time values
=head1 MULTI-LANGUAGE SUPPORT
Date::Parse is capable of parsing dates in several languages, these include
English, French, German and Italian.
$lang = Date::Language->new('German');
$lang->str2time("25 Jun 1996 21:09:55 +0100");
=head1 EXAMPLE DATES
Below is a sample list of dates that are known to be parsable with Date::Parse
1995-01-24T09:08:17.1823213 ISO-8601
Wed, 16 Jun 94 07:29:35 CST Comma and day name are optional
Thu, 13 Oct 94 10:13:13 -0700
Wed, 9 Nov 1994 09:50:32 -0500 (EST) Text in ()'s will be ignored.
21 dec 17:05 Will be parsed in the current time zone
21-dec 17:05
21/dec 17:05
21/dec/93 17:05
1999 10:02:18 "GMT"
16 Nov 94 22:28:20 PST
=head1 BUGS
When both the month and the date are specified in the date as numbers
they are always parsed assuming that the month number comes before the
date. This is the usual format used in American dates.
The reason why it is like this and not dynamic is that it must be
deterministic. Several people have suggested using the current locale,
but this will not work as the date being parsed may not be in the format
of the current locale.
My plans to address this, which will be in a future release, is to allow
the programmer to state what order they want these values parsed in.
=head1 AUTHOR
Graham Barr <gbarr@pobox.com>
=head1 COPYRIGHT
Copyright (c) 1995-2009 Graham Barr. This program is free
software; you can redistribute it and/or modify it under the same terms
as Perl itself.
=head1 AUTHOR
Graham <gbarr@pobox.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2020 by Graham Barr.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut