File Coverage

blib/lib/Locale/CLDR/Locales/En/Any/Hk.pm
Criterion Covered Total %
statement 23 23 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod n/a
total 31 31 100.0


line stmt bran cond sub pod time code
1             =head1
2              
3             Locale::CLDR::Locales::En::Any::Hk - Package for language English
4              
5             =cut
6              
7             package Locale::CLDR::Locales::En::Any::Hk;
8             # This file auto generated from Data\common\main\en_HK.xml
9             # on Sun 24 Apr 8:24:41 am GMT
10              
11 1     1   727 use version;
  1         2  
  1         4  
12              
13             our $VERSION = version->declare('v0.29.0');
14              
15 1     1   78 use v5.10.1;
  1         3  
16 1     1   4 use mro 'c3';
  1         1  
  1         5  
17 1     1   28 use utf8;
  1         1  
  1         5  
18 1     1   32 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         1  
  1         11  
19              
20 1     1   79 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         5  
21 1     1   616 use Moo;
  1         1  
  1         5  
22              
23             extends('Locale::CLDR::Locales::En::Any::001');
24             has 'day_period_data' => (
25             is => 'ro',
26             isa => CodeRef,
27             init_arg => undef,
28             default => sub { sub {
29             # Time in hhmm format
30             my ($self, $type, $time, $day_period_type) = @_;
31             $day_period_type //= 'default';
32             SWITCH:
33             for ($type) {
34             if ($_ eq 'generic') {
35             if($day_period_type eq 'default') {
36             return 'noon' if $time == 1200;
37             return 'midnight' if $time == 0;
38             return 'evening1' if $time >= 1800
39             && $time < 2100;
40             return 'night1' if $time >= 2100;
41             return 'night1' if $time < 600;
42             return 'afternoon1' if $time >= 1200
43             && $time < 1800;
44             return 'morning1' if $time >= 600
45             && $time < 1200;
46             }
47             if($day_period_type eq 'selection') {
48             return 'afternoon1' if $time >= 1200
49             && $time < 1800;
50             return 'morning1' if $time >= 600
51             && $time < 1200;
52             return 'night1' if $time >= 2100;
53             return 'night1' if $time < 600;
54             return 'evening1' if $time >= 1800
55             && $time < 2100;
56             }
57             last SWITCH;
58             }
59             if ($_ eq 'gregorian') {
60             if($day_period_type eq 'default') {
61             return 'noon' if $time == 1200;
62             return 'midnight' if $time == 0;
63             return 'evening1' if $time >= 1800
64             && $time < 2100;
65             return 'night1' if $time >= 2100;
66             return 'night1' if $time < 600;
67             return 'afternoon1' if $time >= 1200
68             && $time < 1800;
69             return 'morning1' if $time >= 600
70             && $time < 1200;
71             }
72             if($day_period_type eq 'selection') {
73             return 'afternoon1' if $time >= 1200
74             && $time < 1800;
75             return 'morning1' if $time >= 600
76             && $time < 1200;
77             return 'night1' if $time >= 2100;
78             return 'night1' if $time < 600;
79             return 'evening1' if $time >= 1800
80             && $time < 2100;
81             }
82             last SWITCH;
83             }
84             }
85             } },
86             );
87              
88             around day_period_data => sub {
89             my ($orig, $self) = @_;
90             return $self->$orig;
91             };
92              
93             has 'eras' => (
94             is => 'ro',
95             isa => HashRef,
96             init_arg => undef,
97             default => sub { {
98             'generic' => {
99             },
100             'gregorian' => {
101             },
102             } },
103             );
104              
105             has 'date_formats' => (
106             is => 'ro',
107             isa => HashRef,
108             init_arg => undef,
109             default => sub { {
110             'generic' => {
111             'full' => q{EEEE, d MMMM, y G},
112             'long' => q{d MMMM, y G},
113             'medium' => q{d MMM, y G},
114             'short' => q{d/M/yy GGGGG},
115             },
116             'gregorian' => {
117             'short' => q{d/M/y},
118             },
119             } },
120             );
121              
122             has 'time_formats' => (
123             is => 'ro',
124             isa => HashRef,
125             init_arg => undef,
126             default => sub { {
127             'generic' => {
128             },
129             'gregorian' => {
130             },
131             } },
132             );
133              
134             has 'datetime_formats' => (
135             is => 'ro',
136             isa => HashRef,
137             init_arg => undef,
138             default => sub { {
139             'generic' => {
140             },
141             'gregorian' => {
142             },
143             } },
144             );
145              
146             has 'datetime_formats_available_formats' => (
147             is => 'ro',
148             isa => HashRef,
149             init_arg => undef,
150             default => sub { {
151             'generic' => {
152             MMMMEd => q{E, d MMMM},
153             yyyyMEd => q{E, d/M/y GGGGG},
154             yyyyMMMEd => q{E, d MMM, y G},
155             yyyyMMMd => q{d MMM, y G},
156             yyyyMd => q{d/M/y GGGGG},
157             },
158             'gregorian' => {
159             MEd => q{E, d/M},
160             MMMMEd => q{E, d MMMM},
161             Md => q{d/M},
162             yM => q{M/y},
163             yMEd => q{E, d/M/y},
164             yMd => q{d/M/y},
165             },
166             } },
167             );
168              
169             has 'datetime_formats_append_item' => (
170             is => 'ro',
171             isa => HashRef,
172             init_arg => undef,
173             default => sub { {
174             } },
175             );
176              
177             has 'datetime_formats_interval' => (
178             is => 'ro',
179             isa => HashRef,
180             init_arg => undef,
181             default => sub { {
182             'generic' => {
183             MEd => {
184             M => q{E, d/M – E, d/M},
185             d => q{E, d/M – E, d/M},
186             },
187             MMMEd => {
188             M => q{E, d MMM – E, d MMM},
189             d => q{E, d MMM – E, d MMM},
190             },
191             Md => {
192             M => q{d/M – d/M},
193             d => q{d/M – d/M},
194             },
195             yMEd => {
196             M => q{E, d/M/y – E, d/M/y G},
197             d => q{E, d/M/y – E, d/M/y G},
198             y => q{E, d/M/y – E, d/M/y G},
199             },
200             yMMMEd => {
201             M => q{E, d MMM – E, d MMM, y G},
202             d => q{E, d MMM – E, d MMM, y G},
203             y => q{E, d MMM, y – E, d MMM, y G},
204             },
205             yMMMd => {
206             M => q{d MMM – d MMM, y G},
207             d => q{d – d MMM, y G},
208             y => q{d MMM, y – d MMM, y G},
209             },
210             yMd => {
211             M => q{d/M/y – d/M/y G},
212             d => q{d/M/y – d/M/y G},
213             y => q{d/M/y – d/M/y G},
214             },
215             },
216             'gregorian' => {
217             MEd => {
218             M => q{E, d/M – E, d/M},
219             d => q{E, d/M – E, d/M},
220             },
221             MMMEd => {
222             M => q{E, d MMM – E, d MMM},
223             d => q{E, d MMM – E, d MMM},
224             },
225             Md => {
226             M => q{d/M – d/M},
227             d => q{d/M – d/M},
228             },
229             yM => {
230             M => q{M/y – M/y},
231             y => q{M/y – M/y},
232             },
233             yMEd => {
234             M => q{E, d/M/y – E, d/M/y},
235             d => q{E, d/M/y – E, d/M/y},
236             y => q{E, d/M/y – E, d/M/y},
237             },
238             yMd => {
239             M => q{d/M/y – d/M/y},
240             d => q{d/M/y – d/M/y},
241             y => q{d/M/y – d/M/y},
242             },
243             },
244             } },
245             );
246              
247             has 'time_zone_names' => (
248             is => 'ro',
249             isa => HashRef,
250             init_arg => undef,
251             default => sub { {
252             'Hong_Kong' => {
253             short => {
254             'daylight' => q(HKST),
255             'generic' => q(HKT),
256             'standard' => q(HKT),
257             },
258             },
259             } }
260             );
261 1     1   2330 no Moo;
  1         1  
  1         4  
262              
263             1;
264              
265             # vim: tabstop=4