File Coverage

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