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