line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Date::Japanese::Era::Table; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
476
|
use utf8; |
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
5
|
|
4
|
1
|
|
|
1
|
|
25
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
184
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require Exporter; |
8
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
9
|
|
|
|
|
|
|
our @EXPORT = qw(%ERA_TABLE %ERA_JA2ASCII %ERA_ASCII2JA); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our %ERA_TABLE = ( |
12
|
|
|
|
|
|
|
# era => [ $ascii, @begin_ymd, @end_ymd ] |
13
|
|
|
|
|
|
|
"明治" => [ 'meiji', 1868, 9, 8, 1912, 7, 29 ], |
14
|
|
|
|
|
|
|
"大正" => [ 'taishou', 1912, 7, 30, 1926, 12, 24 ], |
15
|
|
|
|
|
|
|
"昭和" => [ 'shouwa', 1926, 12, 25, 1989, 1, 7 ], |
16
|
|
|
|
|
|
|
"平成" => [ 'heisei', 1989, 1, 8, 2019, 4, 30 ], |
17
|
|
|
|
|
|
|
"令和" => [ 'reiwa', 2019, 5, 1, 2999, 12, 31 ], # XXX |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our %ERA_JA2ASCII = map { $_ => $ERA_TABLE{$_}->[0] } keys %ERA_TABLE; |
21
|
|
|
|
|
|
|
our %ERA_ASCII2JA = reverse %ERA_JA2ASCII; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
__END__ |