line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
=encoding utf8 |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Locale::CLDR::Locales::Zh::Hans::Hk - Package for language Chinese |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=cut |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# This file auto generated from Data/common/main/zh_Hans_HK.xml |
10
|
|
|
|
|
|
|
# on Mon 11 Apr 5:42:17 pm GMT |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
use strict; |
13
|
1
|
|
|
1
|
|
856
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
14
|
1
|
|
|
1
|
|
5
|
use version; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
18
|
|
15
|
1
|
|
|
1
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
16
|
|
|
|
|
|
|
our $VERSION = version->declare('v0.34.1'); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
use v5.10.1; |
19
|
1
|
|
|
1
|
|
74
|
use mro 'c3'; |
|
1
|
|
|
|
|
3
|
|
20
|
1
|
|
|
1
|
|
6
|
use utf8; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
21
|
1
|
|
|
1
|
|
21
|
use if $^V ge v5.12.0, feature => 'unicode_strings'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
22
|
1
|
|
|
1
|
|
35
|
use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
10
|
|
23
|
1
|
|
|
1
|
|
78
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
24
|
1
|
|
|
1
|
|
795
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
25
|
|
|
|
|
|
|
extends('Locale::CLDR::Locales::Zh::Hans'); |
26
|
|
|
|
|
|
|
has 'units' => ( |
27
|
|
|
|
|
|
|
is => 'ro', |
28
|
|
|
|
|
|
|
isa => HashRef[HashRef[HashRef[Str]]], |
29
|
|
|
|
|
|
|
init_arg => undef, |
30
|
|
|
|
|
|
|
default => sub { { |
31
|
|
|
|
|
|
|
'long' => { |
32
|
|
|
|
|
|
|
'karat' => { |
33
|
|
|
|
|
|
|
'name' => q(开), |
34
|
|
|
|
|
|
|
'other' => q({0}开), |
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
'kelvin' => { |
37
|
|
|
|
|
|
|
'name' => q(开氏度), |
38
|
|
|
|
|
|
|
'other' => q({0}开氏度), |
39
|
|
|
|
|
|
|
}, |
40
|
|
|
|
|
|
|
'per' => { |
41
|
|
|
|
|
|
|
'1' => q({0}/{1}), |
42
|
|
|
|
|
|
|
}, |
43
|
|
|
|
|
|
|
'second' => { |
44
|
|
|
|
|
|
|
'other' => q({0}秒), |
45
|
|
|
|
|
|
|
}, |
46
|
|
|
|
|
|
|
}, |
47
|
|
|
|
|
|
|
'narrow' => { |
48
|
|
|
|
|
|
|
'foot' => { |
49
|
|
|
|
|
|
|
'other' => q({0}英尺), |
50
|
|
|
|
|
|
|
}, |
51
|
|
|
|
|
|
|
'inch' => { |
52
|
|
|
|
|
|
|
'other' => q({0}英寸), |
53
|
|
|
|
|
|
|
}, |
54
|
|
|
|
|
|
|
'light-year' => { |
55
|
|
|
|
|
|
|
'other' => q({0}光年), |
56
|
|
|
|
|
|
|
}, |
57
|
|
|
|
|
|
|
'mile' => { |
58
|
|
|
|
|
|
|
'other' => q({0}英里), |
59
|
|
|
|
|
|
|
}, |
60
|
|
|
|
|
|
|
'picometer' => { |
61
|
|
|
|
|
|
|
'other' => q({0}皮米), |
62
|
|
|
|
|
|
|
}, |
63
|
|
|
|
|
|
|
'yard' => { |
64
|
|
|
|
|
|
|
'other' => q({0}码), |
65
|
|
|
|
|
|
|
}, |
66
|
|
|
|
|
|
|
}, |
67
|
|
|
|
|
|
|
'short' => { |
68
|
|
|
|
|
|
|
'g-force' => { |
69
|
|
|
|
|
|
|
'other' => q({0}G力), |
70
|
|
|
|
|
|
|
}, |
71
|
|
|
|
|
|
|
'karat' => { |
72
|
|
|
|
|
|
|
'name' => q(开), |
73
|
|
|
|
|
|
|
'other' => q({0}开), |
74
|
|
|
|
|
|
|
}, |
75
|
|
|
|
|
|
|
'kelvin' => { |
76
|
|
|
|
|
|
|
'name' => q(开氏度), |
77
|
|
|
|
|
|
|
'other' => q({0}°K), |
78
|
|
|
|
|
|
|
}, |
79
|
|
|
|
|
|
|
}, |
80
|
|
|
|
|
|
|
} } |
81
|
|
|
|
|
|
|
); |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
has 'number_formats' => ( |
84
|
|
|
|
|
|
|
is => 'ro', |
85
|
|
|
|
|
|
|
isa => HashRef, |
86
|
|
|
|
|
|
|
init_arg => undef, |
87
|
|
|
|
|
|
|
default => sub { { |
88
|
|
|
|
|
|
|
decimalFormat => { |
89
|
|
|
|
|
|
|
'long' => { |
90
|
|
|
|
|
|
|
'1000000000000' => { |
91
|
|
|
|
|
|
|
'other' => '0万亿', |
92
|
|
|
|
|
|
|
}, |
93
|
|
|
|
|
|
|
'10000000000000' => { |
94
|
|
|
|
|
|
|
'other' => '00万亿', |
95
|
|
|
|
|
|
|
}, |
96
|
|
|
|
|
|
|
'100000000000000' => { |
97
|
|
|
|
|
|
|
'other' => '000万亿', |
98
|
|
|
|
|
|
|
}, |
99
|
|
|
|
|
|
|
}, |
100
|
|
|
|
|
|
|
'short' => { |
101
|
|
|
|
|
|
|
'1000000000000' => { |
102
|
|
|
|
|
|
|
'other' => '0万亿', |
103
|
|
|
|
|
|
|
}, |
104
|
|
|
|
|
|
|
'10000000000000' => { |
105
|
|
|
|
|
|
|
'other' => '00万亿', |
106
|
|
|
|
|
|
|
}, |
107
|
|
|
|
|
|
|
'100000000000000' => { |
108
|
|
|
|
|
|
|
'other' => '000万亿', |
109
|
|
|
|
|
|
|
}, |
110
|
|
|
|
|
|
|
}, |
111
|
|
|
|
|
|
|
}, |
112
|
|
|
|
|
|
|
} }, |
113
|
|
|
|
|
|
|
); |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
has 'currencies' => ( |
116
|
|
|
|
|
|
|
is => 'ro', |
117
|
|
|
|
|
|
|
isa => HashRef, |
118
|
|
|
|
|
|
|
init_arg => undef, |
119
|
|
|
|
|
|
|
default => sub { { |
120
|
|
|
|
|
|
|
'CNY' => { |
121
|
|
|
|
|
|
|
symbol => 'CN¥', |
122
|
|
|
|
|
|
|
}, |
123
|
|
|
|
|
|
|
'KYD' => { |
124
|
|
|
|
|
|
|
display_name => { |
125
|
|
|
|
|
|
|
'currency' => q(开曼群岛元), |
126
|
|
|
|
|
|
|
'other' => q(开曼群岛元), |
127
|
|
|
|
|
|
|
}, |
128
|
|
|
|
|
|
|
}, |
129
|
|
|
|
|
|
|
'NIO' => { |
130
|
|
|
|
|
|
|
display_name => { |
131
|
|
|
|
|
|
|
'other' => q(尼加拉瓜科多巴), |
132
|
|
|
|
|
|
|
}, |
133
|
|
|
|
|
|
|
}, |
134
|
|
|
|
|
|
|
'XAG' => { |
135
|
|
|
|
|
|
|
display_name => { |
136
|
|
|
|
|
|
|
'currency' => q(白银), |
137
|
|
|
|
|
|
|
}, |
138
|
|
|
|
|
|
|
}, |
139
|
|
|
|
|
|
|
} }, |
140
|
|
|
|
|
|
|
); |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
has 'day_period_data' => ( |
144
|
|
|
|
|
|
|
is => 'ro', |
145
|
|
|
|
|
|
|
isa => CodeRef, |
146
|
|
|
|
|
|
|
init_arg => undef, |
147
|
|
|
|
|
|
|
default => sub { sub { |
148
|
|
|
|
|
|
|
# Time in hhmm format |
149
|
|
|
|
|
|
|
my ($self, $type, $time, $day_period_type) = @_; |
150
|
|
|
|
|
|
|
$day_period_type //= 'default'; |
151
|
|
|
|
|
|
|
SWITCH: |
152
|
|
|
|
|
|
|
for ($type) { |
153
|
|
|
|
|
|
|
if ($_ eq 'buddhist') { |
154
|
|
|
|
|
|
|
if($day_period_type eq 'default') { |
155
|
|
|
|
|
|
|
return 'midnight' if $time == 0; |
156
|
|
|
|
|
|
|
return 'afternoon1' if $time >= 1200 |
157
|
|
|
|
|
|
|
&& $time < 1300; |
158
|
|
|
|
|
|
|
return 'afternoon2' if $time >= 1300 |
159
|
|
|
|
|
|
|
&& $time < 1900; |
160
|
|
|
|
|
|
|
return 'evening1' if $time >= 1900 |
161
|
|
|
|
|
|
|
&& $time < 2400; |
162
|
|
|
|
|
|
|
return 'morning1' if $time >= 500 |
163
|
|
|
|
|
|
|
&& $time < 800; |
164
|
|
|
|
|
|
|
return 'morning2' if $time >= 800 |
165
|
|
|
|
|
|
|
&& $time < 1200; |
166
|
|
|
|
|
|
|
return 'night1' if $time >= 0 |
167
|
|
|
|
|
|
|
&& $time < 500; |
168
|
|
|
|
|
|
|
} |
169
|
|
|
|
|
|
|
if($day_period_type eq 'selection') { |
170
|
|
|
|
|
|
|
return 'afternoon1' if $time >= 1200 |
171
|
|
|
|
|
|
|
&& $time < 1300; |
172
|
|
|
|
|
|
|
return 'afternoon2' if $time >= 1300 |
173
|
|
|
|
|
|
|
&& $time < 1900; |
174
|
|
|
|
|
|
|
return 'evening1' if $time >= 1900 |
175
|
|
|
|
|
|
|
&& $time < 2400; |
176
|
|
|
|
|
|
|
return 'morning1' if $time >= 500 |
177
|
|
|
|
|
|
|
&& $time < 800; |
178
|
|
|
|
|
|
|
return 'morning2' if $time >= 800 |
179
|
|
|
|
|
|
|
&& $time < 1200; |
180
|
|
|
|
|
|
|
return 'night1' if $time >= 0 |
181
|
|
|
|
|
|
|
&& $time < 500; |
182
|
|
|
|
|
|
|
} |
183
|
|
|
|
|
|
|
last SWITCH; |
184
|
|
|
|
|
|
|
} |
185
|
|
|
|
|
|
|
if ($_ eq 'chinese') { |
186
|
|
|
|
|
|
|
if($day_period_type eq 'default') { |
187
|
|
|
|
|
|
|
return 'midnight' if $time == 0; |
188
|
|
|
|
|
|
|
return 'afternoon1' if $time >= 1200 |
189
|
|
|
|
|
|
|
&& $time < 1300; |
190
|
|
|
|
|
|
|
return 'afternoon2' if $time >= 1300 |
191
|
|
|
|
|
|
|
&& $time < 1900; |
192
|
|
|
|
|
|
|
return 'evening1' if $time >= 1900 |
193
|
|
|
|
|
|
|
&& $time < 2400; |
194
|
|
|
|
|
|
|
return 'morning1' if $time >= 500 |
195
|
|
|
|
|
|
|
&& $time < 800; |
196
|
|
|
|
|
|
|
return 'morning2' if $time >= 800 |
197
|
|
|
|
|
|
|
&& $time < 1200; |
198
|
|
|
|
|
|
|
return 'night1' if $time >= 0 |
199
|
|
|
|
|
|
|
&& $time < 500; |
200
|
|
|
|
|
|
|
} |
201
|
|
|
|
|
|
|
if($day_period_type eq 'selection') { |
202
|
|
|
|
|
|
|
return 'afternoon1' if $time >= 1200 |
203
|
|
|
|
|
|
|
&& $time < 1300; |
204
|
|
|
|
|
|
|
return 'afternoon2' if $time >= 1300 |
205
|
|
|
|
|
|
|
&& $time < 1900; |
206
|
|
|
|
|
|
|
return 'evening1' if $time >= 1900 |
207
|
|
|
|
|
|
|
&& $time < 2400; |
208
|
|
|
|
|
|
|
return 'morning1' if $time >= 500 |
209
|
|
|
|
|
|
|
&& $time < 800; |
210
|
|
|
|
|
|
|
return 'morning2' if $time >= 800 |
211
|
|
|
|
|
|
|
&& $time < 1200; |
212
|
|
|
|
|
|
|
return 'night1' if $time >= 0 |
213
|
|
|
|
|
|
|
&& $time < 500; |
214
|
|
|
|
|
|
|
} |
215
|
|
|
|
|
|
|
last SWITCH; |
216
|
|
|
|
|
|
|
} |
217
|
|
|
|
|
|
|
if ($_ eq 'generic') { |
218
|
|
|
|
|
|
|
if($day_period_type eq 'default') { |
219
|
|
|
|
|
|
|
return 'midnight' if $time == 0; |
220
|
|
|
|
|
|
|
return 'afternoon1' if $time >= 1200 |
221
|
|
|
|
|
|
|
&& $time < 1300; |
222
|
|
|
|
|
|
|
return 'afternoon2' if $time >= 1300 |
223
|
|
|
|
|
|
|
&& $time < 1900; |
224
|
|
|
|
|
|
|
return 'evening1' if $time >= 1900 |
225
|
|
|
|
|
|
|
&& $time < 2400; |
226
|
|
|
|
|
|
|
return 'morning1' if $time >= 500 |
227
|
|
|
|
|
|
|
&& $time < 800; |
228
|
|
|
|
|
|
|
return 'morning2' if $time >= 800 |
229
|
|
|
|
|
|
|
&& $time < 1200; |
230
|
|
|
|
|
|
|
return 'night1' if $time >= 0 |
231
|
|
|
|
|
|
|
&& $time < 500; |
232
|
|
|
|
|
|
|
} |
233
|
|
|
|
|
|
|
if($day_period_type eq 'selection') { |
234
|
|
|
|
|
|
|
return 'afternoon1' if $time >= 1200 |
235
|
|
|
|
|
|
|
&& $time < 1300; |
236
|
|
|
|
|
|
|
return 'afternoon2' if $time >= 1300 |
237
|
|
|
|
|
|
|
&& $time < 1900; |
238
|
|
|
|
|
|
|
return 'evening1' if $time >= 1900 |
239
|
|
|
|
|
|
|
&& $time < 2400; |
240
|
|
|
|
|
|
|
return 'morning1' if $time >= 500 |
241
|
|
|
|
|
|
|
&& $time < 800; |
242
|
|
|
|
|
|
|
return 'morning2' if $time >= 800 |
243
|
|
|
|
|
|
|
&& $time < 1200; |
244
|
|
|
|
|
|
|
return 'night1' if $time >= 0 |
245
|
|
|
|
|
|
|
&& $time < 500; |
246
|
|
|
|
|
|
|
} |
247
|
|
|
|
|
|
|
last SWITCH; |
248
|
|
|
|
|
|
|
} |
249
|
|
|
|
|
|
|
if ($_ eq 'gregorian') { |
250
|
|
|
|
|
|
|
if($day_period_type eq 'default') { |
251
|
|
|
|
|
|
|
return 'midnight' if $time == 0; |
252
|
|
|
|
|
|
|
return 'afternoon1' if $time >= 1200 |
253
|
|
|
|
|
|
|
&& $time < 1300; |
254
|
|
|
|
|
|
|
return 'afternoon2' if $time >= 1300 |
255
|
|
|
|
|
|
|
&& $time < 1900; |
256
|
|
|
|
|
|
|
return 'evening1' if $time >= 1900 |
257
|
|
|
|
|
|
|
&& $time < 2400; |
258
|
|
|
|
|
|
|
return 'morning1' if $time >= 500 |
259
|
|
|
|
|
|
|
&& $time < 800; |
260
|
|
|
|
|
|
|
return 'morning2' if $time >= 800 |
261
|
|
|
|
|
|
|
&& $time < 1200; |
262
|
|
|
|
|
|
|
return 'night1' if $time >= 0 |
263
|
|
|
|
|
|
|
&& $time < 500; |
264
|
|
|
|
|
|
|
} |
265
|
|
|
|
|
|
|
if($day_period_type eq 'selection') { |
266
|
|
|
|
|
|
|
return 'afternoon1' if $time >= 1200 |
267
|
|
|
|
|
|
|
&& $time < 1300; |
268
|
|
|
|
|
|
|
return 'afternoon2' if $time >= 1300 |
269
|
|
|
|
|
|
|
&& $time < 1900; |
270
|
|
|
|
|
|
|
return 'evening1' if $time >= 1900 |
271
|
|
|
|
|
|
|
&& $time < 2400; |
272
|
|
|
|
|
|
|
return 'morning1' if $time >= 500 |
273
|
|
|
|
|
|
|
&& $time < 800; |
274
|
|
|
|
|
|
|
return 'morning2' if $time >= 800 |
275
|
|
|
|
|
|
|
&& $time < 1200; |
276
|
|
|
|
|
|
|
return 'night1' if $time >= 0 |
277
|
|
|
|
|
|
|
&& $time < 500; |
278
|
|
|
|
|
|
|
} |
279
|
|
|
|
|
|
|
last SWITCH; |
280
|
|
|
|
|
|
|
} |
281
|
|
|
|
|
|
|
if ($_ eq 'islamic') { |
282
|
|
|
|
|
|
|
if($day_period_type eq 'default') { |
283
|
|
|
|
|
|
|
return 'midnight' if $time == 0; |
284
|
|
|
|
|
|
|
return 'afternoon1' if $time >= 1200 |
285
|
|
|
|
|
|
|
&& $time < 1300; |
286
|
|
|
|
|
|
|
return 'afternoon2' if $time >= 1300 |
287
|
|
|
|
|
|
|
&& $time < 1900; |
288
|
|
|
|
|
|
|
return 'evening1' if $time >= 1900 |
289
|
|
|
|
|
|
|
&& $time < 2400; |
290
|
|
|
|
|
|
|
return 'morning1' if $time >= 500 |
291
|
|
|
|
|
|
|
&& $time < 800; |
292
|
|
|
|
|
|
|
return 'morning2' if $time >= 800 |
293
|
|
|
|
|
|
|
&& $time < 1200; |
294
|
|
|
|
|
|
|
return 'night1' if $time >= 0 |
295
|
|
|
|
|
|
|
&& $time < 500; |
296
|
|
|
|
|
|
|
} |
297
|
|
|
|
|
|
|
if($day_period_type eq 'selection') { |
298
|
|
|
|
|
|
|
return 'afternoon1' if $time >= 1200 |
299
|
|
|
|
|
|
|
&& $time < 1300; |
300
|
|
|
|
|
|
|
return 'afternoon2' if $time >= 1300 |
301
|
|
|
|
|
|
|
&& $time < 1900; |
302
|
|
|
|
|
|
|
return 'evening1' if $time >= 1900 |
303
|
|
|
|
|
|
|
&& $time < 2400; |
304
|
|
|
|
|
|
|
return 'morning1' if $time >= 500 |
305
|
|
|
|
|
|
|
&& $time < 800; |
306
|
|
|
|
|
|
|
return 'morning2' if $time >= 800 |
307
|
|
|
|
|
|
|
&& $time < 1200; |
308
|
|
|
|
|
|
|
return 'night1' if $time >= 0 |
309
|
|
|
|
|
|
|
&& $time < 500; |
310
|
|
|
|
|
|
|
} |
311
|
|
|
|
|
|
|
last SWITCH; |
312
|
|
|
|
|
|
|
} |
313
|
|
|
|
|
|
|
if ($_ eq 'japanese') { |
314
|
|
|
|
|
|
|
if($day_period_type eq 'default') { |
315
|
|
|
|
|
|
|
return 'midnight' if $time == 0; |
316
|
|
|
|
|
|
|
return 'afternoon1' if $time >= 1200 |
317
|
|
|
|
|
|
|
&& $time < 1300; |
318
|
|
|
|
|
|
|
return 'afternoon2' if $time >= 1300 |
319
|
|
|
|
|
|
|
&& $time < 1900; |
320
|
|
|
|
|
|
|
return 'evening1' if $time >= 1900 |
321
|
|
|
|
|
|
|
&& $time < 2400; |
322
|
|
|
|
|
|
|
return 'morning1' if $time >= 500 |
323
|
|
|
|
|
|
|
&& $time < 800; |
324
|
|
|
|
|
|
|
return 'morning2' if $time >= 800 |
325
|
|
|
|
|
|
|
&& $time < 1200; |
326
|
|
|
|
|
|
|
return 'night1' if $time >= 0 |
327
|
|
|
|
|
|
|
&& $time < 500; |
328
|
|
|
|
|
|
|
} |
329
|
|
|
|
|
|
|
if($day_period_type eq 'selection') { |
330
|
|
|
|
|
|
|
return 'afternoon1' if $time >= 1200 |
331
|
|
|
|
|
|
|
&& $time < 1300; |
332
|
|
|
|
|
|
|
return 'afternoon2' if $time >= 1300 |
333
|
|
|
|
|
|
|
&& $time < 1900; |
334
|
|
|
|
|
|
|
return 'evening1' if $time >= 1900 |
335
|
|
|
|
|
|
|
&& $time < 2400; |
336
|
|
|
|
|
|
|
return 'morning1' if $time >= 500 |
337
|
|
|
|
|
|
|
&& $time < 800; |
338
|
|
|
|
|
|
|
return 'morning2' if $time >= 800 |
339
|
|
|
|
|
|
|
&& $time < 1200; |
340
|
|
|
|
|
|
|
return 'night1' if $time >= 0 |
341
|
|
|
|
|
|
|
&& $time < 500; |
342
|
|
|
|
|
|
|
} |
343
|
|
|
|
|
|
|
last SWITCH; |
344
|
|
|
|
|
|
|
} |
345
|
|
|
|
|
|
|
if ($_ eq 'roc') { |
346
|
|
|
|
|
|
|
if($day_period_type eq 'default') { |
347
|
|
|
|
|
|
|
return 'midnight' if $time == 0; |
348
|
|
|
|
|
|
|
return 'afternoon1' if $time >= 1200 |
349
|
|
|
|
|
|
|
&& $time < 1300; |
350
|
|
|
|
|
|
|
return 'afternoon2' if $time >= 1300 |
351
|
|
|
|
|
|
|
&& $time < 1900; |
352
|
|
|
|
|
|
|
return 'evening1' if $time >= 1900 |
353
|
|
|
|
|
|
|
&& $time < 2400; |
354
|
|
|
|
|
|
|
return 'morning1' if $time >= 500 |
355
|
|
|
|
|
|
|
&& $time < 800; |
356
|
|
|
|
|
|
|
return 'morning2' if $time >= 800 |
357
|
|
|
|
|
|
|
&& $time < 1200; |
358
|
|
|
|
|
|
|
return 'night1' if $time >= 0 |
359
|
|
|
|
|
|
|
&& $time < 500; |
360
|
|
|
|
|
|
|
} |
361
|
|
|
|
|
|
|
if($day_period_type eq 'selection') { |
362
|
|
|
|
|
|
|
return 'afternoon1' if $time >= 1200 |
363
|
|
|
|
|
|
|
&& $time < 1300; |
364
|
|
|
|
|
|
|
return 'afternoon2' if $time >= 1300 |
365
|
|
|
|
|
|
|
&& $time < 1900; |
366
|
|
|
|
|
|
|
return 'evening1' if $time >= 1900 |
367
|
|
|
|
|
|
|
&& $time < 2400; |
368
|
|
|
|
|
|
|
return 'morning1' if $time >= 500 |
369
|
|
|
|
|
|
|
&& $time < 800; |
370
|
|
|
|
|
|
|
return 'morning2' if $time >= 800 |
371
|
|
|
|
|
|
|
&& $time < 1200; |
372
|
|
|
|
|
|
|
return 'night1' if $time >= 0 |
373
|
|
|
|
|
|
|
&& $time < 500; |
374
|
|
|
|
|
|
|
} |
375
|
|
|
|
|
|
|
last SWITCH; |
376
|
|
|
|
|
|
|
} |
377
|
|
|
|
|
|
|
} |
378
|
|
|
|
|
|
|
} }, |
379
|
|
|
|
|
|
|
); |
380
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
around day_period_data => sub { |
382
|
|
|
|
|
|
|
my ($orig, $self) = @_; |
383
|
|
|
|
|
|
|
return $self->$orig; |
384
|
|
|
|
|
|
|
}; |
385
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
has 'eras' => ( |
387
|
|
|
|
|
|
|
is => 'ro', |
388
|
|
|
|
|
|
|
isa => HashRef, |
389
|
|
|
|
|
|
|
init_arg => undef, |
390
|
|
|
|
|
|
|
default => sub { { |
391
|
|
|
|
|
|
|
'buddhist' => { |
392
|
|
|
|
|
|
|
}, |
393
|
|
|
|
|
|
|
'chinese' => { |
394
|
|
|
|
|
|
|
}, |
395
|
|
|
|
|
|
|
'generic' => { |
396
|
|
|
|
|
|
|
}, |
397
|
|
|
|
|
|
|
'gregorian' => { |
398
|
|
|
|
|
|
|
}, |
399
|
|
|
|
|
|
|
'islamic' => { |
400
|
|
|
|
|
|
|
}, |
401
|
|
|
|
|
|
|
'japanese' => { |
402
|
|
|
|
|
|
|
}, |
403
|
|
|
|
|
|
|
'roc' => { |
404
|
|
|
|
|
|
|
}, |
405
|
|
|
|
|
|
|
} }, |
406
|
|
|
|
|
|
|
); |
407
|
|
|
|
|
|
|
|
408
|
|
|
|
|
|
|
has 'date_formats' => ( |
409
|
|
|
|
|
|
|
is => 'ro', |
410
|
|
|
|
|
|
|
isa => HashRef, |
411
|
|
|
|
|
|
|
init_arg => undef, |
412
|
|
|
|
|
|
|
default => sub { { |
413
|
|
|
|
|
|
|
'buddhist' => { |
414
|
|
|
|
|
|
|
'short' => q{Gd/M/yy}, |
415
|
|
|
|
|
|
|
}, |
416
|
|
|
|
|
|
|
'chinese' => { |
417
|
|
|
|
|
|
|
'full' => q{U年MMMd日EEEE}, |
418
|
|
|
|
|
|
|
'long' => q{U年MMMd日}, |
419
|
|
|
|
|
|
|
'medium' => q{U年MMMd日}, |
420
|
|
|
|
|
|
|
}, |
421
|
|
|
|
|
|
|
'generic' => { |
422
|
|
|
|
|
|
|
'short' => q{d/M/yyGGGGG}, |
423
|
|
|
|
|
|
|
}, |
424
|
|
|
|
|
|
|
'gregorian' => { |
425
|
|
|
|
|
|
|
'short' => q{d/M/yy}, |
426
|
|
|
|
|
|
|
}, |
427
|
|
|
|
|
|
|
'islamic' => { |
428
|
|
|
|
|
|
|
'short' => q{Gd/M/yy}, |
429
|
|
|
|
|
|
|
}, |
430
|
|
|
|
|
|
|
'japanese' => { |
431
|
|
|
|
|
|
|
'short' => q{Gd/M/yy}, |
432
|
|
|
|
|
|
|
}, |
433
|
|
|
|
|
|
|
'roc' => { |
434
|
|
|
|
|
|
|
'short' => q{Gd/M/yy}, |
435
|
|
|
|
|
|
|
}, |
436
|
|
|
|
|
|
|
} }, |
437
|
|
|
|
|
|
|
); |
438
|
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
has 'time_formats' => ( |
440
|
|
|
|
|
|
|
is => 'ro', |
441
|
|
|
|
|
|
|
isa => HashRef, |
442
|
|
|
|
|
|
|
init_arg => undef, |
443
|
|
|
|
|
|
|
default => sub { { |
444
|
|
|
|
|
|
|
'buddhist' => { |
445
|
|
|
|
|
|
|
}, |
446
|
|
|
|
|
|
|
'chinese' => { |
447
|
|
|
|
|
|
|
}, |
448
|
|
|
|
|
|
|
'generic' => { |
449
|
|
|
|
|
|
|
}, |
450
|
|
|
|
|
|
|
'gregorian' => { |
451
|
|
|
|
|
|
|
}, |
452
|
|
|
|
|
|
|
'islamic' => { |
453
|
|
|
|
|
|
|
}, |
454
|
|
|
|
|
|
|
'japanese' => { |
455
|
|
|
|
|
|
|
}, |
456
|
|
|
|
|
|
|
'roc' => { |
457
|
|
|
|
|
|
|
}, |
458
|
|
|
|
|
|
|
} }, |
459
|
|
|
|
|
|
|
); |
460
|
|
|
|
|
|
|
|
461
|
|
|
|
|
|
|
has 'datetime_formats' => ( |
462
|
|
|
|
|
|
|
is => 'ro', |
463
|
|
|
|
|
|
|
isa => HashRef, |
464
|
|
|
|
|
|
|
init_arg => undef, |
465
|
|
|
|
|
|
|
default => sub { { |
466
|
|
|
|
|
|
|
'buddhist' => { |
467
|
|
|
|
|
|
|
}, |
468
|
|
|
|
|
|
|
'chinese' => { |
469
|
|
|
|
|
|
|
}, |
470
|
|
|
|
|
|
|
'generic' => { |
471
|
|
|
|
|
|
|
}, |
472
|
|
|
|
|
|
|
'gregorian' => { |
473
|
|
|
|
|
|
|
}, |
474
|
|
|
|
|
|
|
'islamic' => { |
475
|
|
|
|
|
|
|
}, |
476
|
|
|
|
|
|
|
'japanese' => { |
477
|
|
|
|
|
|
|
}, |
478
|
|
|
|
|
|
|
'roc' => { |
479
|
|
|
|
|
|
|
}, |
480
|
|
|
|
|
|
|
} }, |
481
|
|
|
|
|
|
|
); |
482
|
|
|
|
|
|
|
|
483
|
|
|
|
|
|
|
has 'datetime_formats_available_formats' => ( |
484
|
|
|
|
|
|
|
is => 'ro', |
485
|
|
|
|
|
|
|
isa => HashRef, |
486
|
|
|
|
|
|
|
init_arg => undef, |
487
|
|
|
|
|
|
|
default => sub { { |
488
|
|
|
|
|
|
|
'buddhist' => { |
489
|
|
|
|
|
|
|
M => q{L}, |
490
|
|
|
|
|
|
|
MEd => q{M/dE}, |
491
|
|
|
|
|
|
|
}, |
492
|
|
|
|
|
|
|
'generic' => { |
493
|
|
|
|
|
|
|
HHmm => q{HH:mm}, |
494
|
|
|
|
|
|
|
MEd => q{E, d/M}, |
495
|
|
|
|
|
|
|
MMM => q{M月}, |
496
|
|
|
|
|
|
|
MMMMdd => q{M月d日}, |
497
|
|
|
|
|
|
|
Md => q{d/M}, |
498
|
|
|
|
|
|
|
yyyyM => q{M/yGGGGG}, |
499
|
|
|
|
|
|
|
yyyyMEd => q{E, d/M/yGGGGG}, |
500
|
|
|
|
|
|
|
yyyyMd => q{d/M/yGGGGG}, |
501
|
|
|
|
|
|
|
}, |
502
|
|
|
|
|
|
|
'gregorian' => { |
503
|
|
|
|
|
|
|
HHmm => q{HH:mm}, |
504
|
|
|
|
|
|
|
MEd => q{E, d/M}, |
505
|
|
|
|
|
|
|
MMMMdd => q{M月d日}, |
506
|
|
|
|
|
|
|
MMdd => q{dd/MM}, |
507
|
|
|
|
|
|
|
Md => q{d/M}, |
508
|
|
|
|
|
|
|
yM => q{M/y}, |
509
|
|
|
|
|
|
|
yMEd => q{d/M/y(E)}, |
510
|
|
|
|
|
|
|
yMM => q{MM/y}, |
511
|
|
|
|
|
|
|
yMd => q{d/M/y}, |
512
|
|
|
|
|
|
|
}, |
513
|
|
|
|
|
|
|
'japanese' => { |
514
|
|
|
|
|
|
|
MEd => q{M/dE}, |
515
|
|
|
|
|
|
|
Md => q{M/d}, |
516
|
|
|
|
|
|
|
}, |
517
|
|
|
|
|
|
|
'roc' => { |
518
|
|
|
|
|
|
|
M => q{L}, |
519
|
|
|
|
|
|
|
MMM => q{M月}, |
520
|
|
|
|
|
|
|
Md => q{M-d}, |
521
|
|
|
|
|
|
|
}, |
522
|
|
|
|
|
|
|
} }, |
523
|
|
|
|
|
|
|
); |
524
|
|
|
|
|
|
|
|
525
|
|
|
|
|
|
|
has 'datetime_formats_append_item' => ( |
526
|
|
|
|
|
|
|
is => 'ro', |
527
|
|
|
|
|
|
|
isa => HashRef, |
528
|
|
|
|
|
|
|
init_arg => undef, |
529
|
|
|
|
|
|
|
default => sub { { |
530
|
|
|
|
|
|
|
} }, |
531
|
|
|
|
|
|
|
); |
532
|
|
|
|
|
|
|
|
533
|
|
|
|
|
|
|
has 'datetime_formats_interval' => ( |
534
|
|
|
|
|
|
|
is => 'ro', |
535
|
|
|
|
|
|
|
isa => HashRef, |
536
|
|
|
|
|
|
|
init_arg => undef, |
537
|
|
|
|
|
|
|
default => sub { { |
538
|
|
|
|
|
|
|
'generic' => { |
539
|
|
|
|
|
|
|
Hmv => { |
540
|
|
|
|
|
|
|
H => q{vHH:mm–HH:mm}, |
541
|
|
|
|
|
|
|
m => q{vHH:mm–HH:mm}, |
542
|
|
|
|
|
|
|
}, |
543
|
|
|
|
|
|
|
Hv => { |
544
|
|
|
|
|
|
|
H => q{vHH–HH}, |
545
|
|
|
|
|
|
|
}, |
546
|
|
|
|
|
|
|
fallback => '{0}–{1}', |
547
|
|
|
|
|
|
|
h => { |
548
|
|
|
|
|
|
|
h => q{ah至h时}, |
549
|
|
|
|
|
|
|
}, |
550
|
|
|
|
|
|
|
yM => { |
551
|
|
|
|
|
|
|
M => q{y年M月至y年M月}, |
552
|
|
|
|
|
|
|
}, |
553
|
|
|
|
|
|
|
yMEd => { |
554
|
|
|
|
|
|
|
M => q{d/M/yE至d/M/yE}, |
555
|
|
|
|
|
|
|
d => q{d/M/yE至d/M/yE}, |
556
|
|
|
|
|
|
|
y => q{d/M/yE至d/M/yE}, |
557
|
|
|
|
|
|
|
}, |
558
|
|
|
|
|
|
|
yMMMEd => { |
559
|
|
|
|
|
|
|
d => q{y年M月d日E至M月d日E}, |
560
|
|
|
|
|
|
|
}, |
561
|
|
|
|
|
|
|
yMd => { |
562
|
|
|
|
|
|
|
M => q{d/M/y至d/M/y}, |
563
|
|
|
|
|
|
|
d => q{d/M/y至d/M/y}, |
564
|
|
|
|
|
|
|
y => q{d/M/y至d/M/y}, |
565
|
|
|
|
|
|
|
}, |
566
|
|
|
|
|
|
|
}, |
567
|
|
|
|
|
|
|
'gregorian' => { |
568
|
|
|
|
|
|
|
Hmv => { |
569
|
|
|
|
|
|
|
H => q{vHH:mm–HH:mm}, |
570
|
|
|
|
|
|
|
m => q{vHH:mm–HH:mm}, |
571
|
|
|
|
|
|
|
}, |
572
|
|
|
|
|
|
|
Hv => { |
573
|
|
|
|
|
|
|
H => q{vHH–HH}, |
574
|
|
|
|
|
|
|
}, |
575
|
|
|
|
|
|
|
fallback => '{0}–{1}', |
576
|
|
|
|
|
|
|
h => { |
577
|
|
|
|
|
|
|
h => q{ah至h时}, |
578
|
|
|
|
|
|
|
}, |
579
|
|
|
|
|
|
|
yM => { |
580
|
|
|
|
|
|
|
M => q{y年M月至y年M月}, |
581
|
|
|
|
|
|
|
}, |
582
|
|
|
|
|
|
|
yMEd => { |
583
|
|
|
|
|
|
|
M => q{d/M/yE至d/M/yE}, |
584
|
|
|
|
|
|
|
d => q{d/M/yE至d/M/yE}, |
585
|
|
|
|
|
|
|
y => q{d/M/yE至d/M/yE}, |
586
|
|
|
|
|
|
|
}, |
587
|
|
|
|
|
|
|
yMMMEd => { |
588
|
|
|
|
|
|
|
d => q{y年M月d日E至M月d日E}, |
589
|
|
|
|
|
|
|
}, |
590
|
|
|
|
|
|
|
yMd => { |
591
|
|
|
|
|
|
|
M => q{d/M/y至d/M/y}, |
592
|
|
|
|
|
|
|
d => q{d/M/y至d/M/y}, |
593
|
|
|
|
|
|
|
y => q{d/M/y至d/M/y}, |
594
|
|
|
|
|
|
|
}, |
595
|
|
|
|
|
|
|
}, |
596
|
|
|
|
|
|
|
} }, |
597
|
|
|
|
|
|
|
); |
598
|
|
|
|
|
|
|
|
599
|
|
|
|
|
|
|
no Moo; |
600
|
1
|
|
|
1
|
|
1785
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3
|
|
601
|
|
|
|
|
|
|
1; |
602
|
|
|
|
|
|
|
|
603
|
|
|
|
|
|
|
# vim: tabstop=4 |