File Coverage

blib/lib/Locale/CLDR/Locales/Zh/Hans/Mo.pm
Criterion Covered Total %
statement 29 29 100.0
branch n/a
condition n/a
subroutine 10 10 100.0
pod n/a
total 39 39 100.0


line stmt bran cond sub pod time code
1             =encoding utf8
2              
3             =head1
4              
5             Locale::CLDR::Locales::Zh::Hans::Mo - Package for language Chinese
6              
7             =cut
8              
9             # This file auto generated from Data/common/main/zh_Hans_MO.xml
10             # on Mon 11 Apr 5:42:18 pm GMT
11              
12             use strict;
13 1     1   813 use warnings;
  1         2  
  1         22  
14 1     1   4 use version;
  1         2  
  1         18  
15 1     1   4  
  1         1  
  1         5  
16             our $VERSION = version->declare('v0.34.1');
17              
18             use v5.10.1;
19 1     1   76 use mro 'c3';
  1         3  
20 1     1   4 use utf8;
  1         2  
  1         3  
21 1     1   18 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         2  
  1         12  
22 1     1   30 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         1  
  1         10  
23 1     1   88 use Moo;
  1         8  
  1         7  
24 1     1   783  
  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 'currencies' => (
84             is => 'ro',
85             isa => HashRef,
86             init_arg => undef,
87             default => sub { {
88             'ANG' => {
89             display_name => {
90             'other' => q(荷兰安的列斯盾),
91             },
92             },
93             'CNY' => {
94             symbol => 'CN¥',
95             },
96             'MOP' => {
97             symbol => 'MOP$',
98             },
99             'NIO' => {
100             display_name => {
101             'other' => q(尼加拉瓜科多巴),
102             },
103             },
104             'XAG' => {
105             display_name => {
106             'currency' => q(白银),
107             },
108             },
109             } },
110             );
111              
112              
113             has 'day_period_data' => (
114             is => 'ro',
115             isa => CodeRef,
116             init_arg => undef,
117             default => sub { sub {
118             # Time in hhmm format
119             my ($self, $type, $time, $day_period_type) = @_;
120             $day_period_type //= 'default';
121             SWITCH:
122             for ($type) {
123             if ($_ eq 'chinese') {
124             if($day_period_type eq 'default') {
125             return 'midnight' if $time == 0;
126             return 'afternoon1' if $time >= 1200
127             && $time < 1300;
128             return 'afternoon2' if $time >= 1300
129             && $time < 1900;
130             return 'evening1' if $time >= 1900
131             && $time < 2400;
132             return 'morning1' if $time >= 500
133             && $time < 800;
134             return 'morning2' if $time >= 800
135             && $time < 1200;
136             return 'night1' if $time >= 0
137             && $time < 500;
138             }
139             if($day_period_type eq 'selection') {
140             return 'afternoon1' if $time >= 1200
141             && $time < 1300;
142             return 'afternoon2' if $time >= 1300
143             && $time < 1900;
144             return 'evening1' if $time >= 1900
145             && $time < 2400;
146             return 'morning1' if $time >= 500
147             && $time < 800;
148             return 'morning2' if $time >= 800
149             && $time < 1200;
150             return 'night1' if $time >= 0
151             && $time < 500;
152             }
153             last SWITCH;
154             }
155             if ($_ eq 'generic') {
156             if($day_period_type eq 'default') {
157             return 'midnight' if $time == 0;
158             return 'afternoon1' if $time >= 1200
159             && $time < 1300;
160             return 'afternoon2' if $time >= 1300
161             && $time < 1900;
162             return 'evening1' if $time >= 1900
163             && $time < 2400;
164             return 'morning1' if $time >= 500
165             && $time < 800;
166             return 'morning2' if $time >= 800
167             && $time < 1200;
168             return 'night1' if $time >= 0
169             && $time < 500;
170             }
171             if($day_period_type eq 'selection') {
172             return 'afternoon1' if $time >= 1200
173             && $time < 1300;
174             return 'afternoon2' if $time >= 1300
175             && $time < 1900;
176             return 'evening1' if $time >= 1900
177             && $time < 2400;
178             return 'morning1' if $time >= 500
179             && $time < 800;
180             return 'morning2' if $time >= 800
181             && $time < 1200;
182             return 'night1' if $time >= 0
183             && $time < 500;
184             }
185             last SWITCH;
186             }
187             if ($_ eq 'gregorian') {
188             if($day_period_type eq 'default') {
189             return 'midnight' if $time == 0;
190             return 'afternoon1' if $time >= 1200
191             && $time < 1300;
192             return 'afternoon2' if $time >= 1300
193             && $time < 1900;
194             return 'evening1' if $time >= 1900
195             && $time < 2400;
196             return 'morning1' if $time >= 500
197             && $time < 800;
198             return 'morning2' if $time >= 800
199             && $time < 1200;
200             return 'night1' if $time >= 0
201             && $time < 500;
202             }
203             if($day_period_type eq 'selection') {
204             return 'afternoon1' if $time >= 1200
205             && $time < 1300;
206             return 'afternoon2' if $time >= 1300
207             && $time < 1900;
208             return 'evening1' if $time >= 1900
209             && $time < 2400;
210             return 'morning1' if $time >= 500
211             && $time < 800;
212             return 'morning2' if $time >= 800
213             && $time < 1200;
214             return 'night1' if $time >= 0
215             && $time < 500;
216             }
217             last SWITCH;
218             }
219             if ($_ eq 'islamic') {
220             if($day_period_type eq 'default') {
221             return 'midnight' if $time == 0;
222             return 'afternoon1' if $time >= 1200
223             && $time < 1300;
224             return 'afternoon2' if $time >= 1300
225             && $time < 1900;
226             return 'evening1' if $time >= 1900
227             && $time < 2400;
228             return 'morning1' if $time >= 500
229             && $time < 800;
230             return 'morning2' if $time >= 800
231             && $time < 1200;
232             return 'night1' if $time >= 0
233             && $time < 500;
234             }
235             if($day_period_type eq 'selection') {
236             return 'afternoon1' if $time >= 1200
237             && $time < 1300;
238             return 'afternoon2' if $time >= 1300
239             && $time < 1900;
240             return 'evening1' if $time >= 1900
241             && $time < 2400;
242             return 'morning1' if $time >= 500
243             && $time < 800;
244             return 'morning2' if $time >= 800
245             && $time < 1200;
246             return 'night1' if $time >= 0
247             && $time < 500;
248             }
249             last SWITCH;
250             }
251             if ($_ eq 'roc') {
252             if($day_period_type eq 'default') {
253             return 'midnight' if $time == 0;
254             return 'afternoon1' if $time >= 1200
255             && $time < 1300;
256             return 'afternoon2' if $time >= 1300
257             && $time < 1900;
258             return 'evening1' if $time >= 1900
259             && $time < 2400;
260             return 'morning1' if $time >= 500
261             && $time < 800;
262             return 'morning2' if $time >= 800
263             && $time < 1200;
264             return 'night1' if $time >= 0
265             && $time < 500;
266             }
267             if($day_period_type eq 'selection') {
268             return 'afternoon1' if $time >= 1200
269             && $time < 1300;
270             return 'afternoon2' if $time >= 1300
271             && $time < 1900;
272             return 'evening1' if $time >= 1900
273             && $time < 2400;
274             return 'morning1' if $time >= 500
275             && $time < 800;
276             return 'morning2' if $time >= 800
277             && $time < 1200;
278             return 'night1' if $time >= 0
279             && $time < 500;
280             }
281             last SWITCH;
282             }
283             }
284             } },
285             );
286              
287             around day_period_data => sub {
288             my ($orig, $self) = @_;
289             return $self->$orig;
290             };
291              
292             has 'eras' => (
293             is => 'ro',
294             isa => HashRef,
295             init_arg => undef,
296             default => sub { {
297             'chinese' => {
298             },
299             'generic' => {
300             },
301             'gregorian' => {
302             },
303             'islamic' => {
304             },
305             'roc' => {
306             },
307             } },
308             );
309              
310             has 'date_formats' => (
311             is => 'ro',
312             isa => HashRef,
313             init_arg => undef,
314             default => sub { {
315             'chinese' => {
316             'full' => q{U年MMMd日EEEE},
317             'long' => q{U年MMMd日},
318             'medium' => q{U年MMMd日},
319             },
320             'generic' => {
321             'short' => q{d/M/yyGGGGG},
322             },
323             'gregorian' => {
324             'short' => q{d/M/yy},
325             },
326             'islamic' => {
327             'short' => q{Gd/M/yy},
328             },
329             'roc' => {
330             'short' => q{Gd/M/yy},
331             },
332             } },
333             );
334              
335             has 'time_formats' => (
336             is => 'ro',
337             isa => HashRef,
338             init_arg => undef,
339             default => sub { {
340             'chinese' => {
341             },
342             'generic' => {
343             },
344             'gregorian' => {
345             },
346             'islamic' => {
347             },
348             'roc' => {
349             },
350             } },
351             );
352              
353             has 'datetime_formats' => (
354             is => 'ro',
355             isa => HashRef,
356             init_arg => undef,
357             default => sub { {
358             'chinese' => {
359             },
360             'generic' => {
361             },
362             'gregorian' => {
363             },
364             'islamic' => {
365             },
366             'roc' => {
367             },
368             } },
369             );
370              
371             has 'datetime_formats_available_formats' => (
372             is => 'ro',
373             isa => HashRef,
374             init_arg => undef,
375             default => sub { {
376             'generic' => {
377             MEd => q{M-dE},
378             MMMMdd => q{M月d日},
379             MMdd => q{MM-dd},
380             Md => q{M-d},
381             yyyyMEd => q{Gy年M月d日,E},
382             yyyyMd => q{Gy年M月d日},
383             },
384             'gregorian' => {
385             MEd => q{E, d/M},
386             MMMMdd => q{M月d日},
387             MMdd => q{dd/MM},
388             Md => q{d/M},
389             yMEd => q{y年M月d日,E},
390             yMd => q{y年M月d日},
391             },
392             'roc' => {
393             MEd => q{M-dE},
394             MMM => q{M月},
395             Md => q{M-d},
396             },
397             } },
398             );
399              
400             has 'datetime_formats_append_item' => (
401             is => 'ro',
402             isa => HashRef,
403             init_arg => undef,
404             default => sub { {
405             } },
406             );
407              
408             has 'datetime_formats_interval' => (
409             is => 'ro',
410             isa => HashRef,
411             init_arg => undef,
412             default => sub { {
413             'generic' => {
414             Hmv => {
415             H => q{vHH:mm–HH:mm},
416             m => q{vHH:mm–HH:mm},
417             },
418             Hv => {
419             H => q{vHH–HH},
420             },
421             MEd => {
422             M => q{M-dE至M-dE},
423             d => q{M-dE至M-dE},
424             },
425             MMMEd => {
426             d => q{M月d日E至M月d日E},
427             },
428             Md => {
429             M => q{M-d至M-d},
430             d => q{M-d至M-d},
431             },
432             fallback => '{0}–{1}',
433             yM => {
434             M => q{y年M月至y年M月},
435             },
436             yMEd => {
437             M => q{d/M/yE至d/M/yE},
438             d => q{d/M/yE至d/M/yE},
439             y => q{d/M/yE至d/M/yE},
440             },
441             yMMMEd => {
442             d => q{y年M月d日E至M月d日E},
443             },
444             yMd => {
445             M => q{d/M/y至d/M/y},
446             d => q{d/M/y至d/M/y},
447             y => q{d/M/y至d/M/y},
448             },
449             },
450             'gregorian' => {
451             Hmv => {
452             H => q{vHH:mm–HH:mm},
453             m => q{vHH:mm–HH:mm},
454             },
455             Hv => {
456             H => q{vHH–HH},
457             },
458             MEd => {
459             M => q{M-dE至M-dE},
460             d => q{M-dE至M-dE},
461             },
462             MMMEd => {
463             d => q{M月d日E至M月d日E},
464             },
465             Md => {
466             M => q{M-d至M-d},
467             d => q{M-d至M-d},
468             },
469             d => {
470             d => q{d日至d日},
471             },
472             fallback => '{0}–{1}',
473             yM => {
474             M => q{y年M月至y年M月},
475             },
476             yMEd => {
477             M => q{d/M/yE至d/M/yE},
478             d => q{d/M/yE至d/M/yE},
479             y => q{d/M/yE至d/M/yE},
480             },
481             yMMMEd => {
482             d => q{y年M月d日E至M月d日E},
483             },
484             yMd => {
485             M => q{d/M/y至d/M/y},
486             d => q{d/M/y至d/M/y},
487             y => q{d/M/y至d/M/y},
488             },
489             },
490             } },
491             );
492              
493             no Moo;
494 1     1   1501  
  1         2  
  1         4  
495             1;
496              
497             # vim: tabstop=4