Debian Codegraph @

lib/Date/Language/English.pm

raw
1 ##
2 ## English tables
3 ##
4
5 package Date::Language::English;
6
7 use strict;
8 use warnings;
9 use Date::Language ();
10 use base 'Date::Language';
11
12 our $VERSION = '2.35'; # VERSION: generated
13 # ABSTRACT: English localization for Date::Format
14
15 our (@DoW, @DoWs, @MoY, @MoYs, @AMPM, @Dsuf, %MoY, %DoW);
16
17 @DoW = qw(Sunday Monday Tuesday Wednesday Thursday Friday Saturday);
18 @MoY = qw(January February March April May June
19 July August September October November December);
20 @DoWs = map { substr($_,0,3) } @DoW;
21 @MoYs = map { substr($_,0,3) } @MoY;
22 @AMPM = qw(AM PM);
23
24 @Dsuf = (qw(th st nd rd th th th th th th)) x 3;
25 @Dsuf[11,12,13] = qw(th th th);
26 @Dsuf[30,31] = qw(th st);
27
28 Date::Language::_build_lookups();
29
30 # Formatting routines
31
32 sub format_a { $DoWs[$_[0]->[6]] }
33 sub format_A { $DoW[$_[0]->[6]] }
34 sub format_b { $MoYs[$_[0]->[4]] }
35 sub format_B { $MoY[$_[0]->[4]] }
36 sub format_h { $MoYs[$_[0]->[4]] }
37 sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
38
39 1;
40
41 __END__
42
43 =pod
44
45 =encoding UTF-8
46
47 =head1 NAME
48
49 Date::Language::English - English localization for Date::Format
50
51 =head1 VERSION
52
53 version 2.35
54
55 =head1 AUTHOR
56
57 Graham <[email protected]>
58
59 =head1 COPYRIGHT AND LICENSE
60
61 This software is copyright (c) 2020 by Graham Barr.
62
63 This is free software; you can redistribute it and/or modify it under
64 the same terms as the Perl 5 programming language system itself.
65
66 =cut