File Coverage

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