File Coverage

blib/lib/Locale/CLDR/Locales/En/Latn/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::En::Latn::Hk - Package for language English
6              
7             =cut
8              
9             package Locale::CLDR::Locales::En::Latn::Hk;
10             # This file auto generated from Data\common\main\en_HK.xml
11             # on Fri 17 Jan 12:03:31 pm GMT
12              
13 1     1   1473 use strict;
  1         2  
  1         42  
14 1     1   5 use warnings;
  1         3  
  1         86  
15 1     1   8 use version;
  1         2  
  1         7  
16              
17             our $VERSION = version->declare('v0.46.0');
18              
19 1     1   130 use v5.12.0;
  1         5  
20 1     1   5 use mro 'c3';
  1         2  
  1         25  
21 1     1   41 use utf8;
  1         1  
  1         7  
22 1     1   32 use feature 'unicode_strings';
  1         2  
  1         186  
23 1     1   8 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         3  
  1         9  
24 1     1   3001 use Moo;
  1         2  
  1         8  
25              
26             extends('Locale::CLDR::Locales::En::Latn::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 'midnight' if $time == 0;
40             return 'noon' if $time == 1200;
41             return 'afternoon1' if $time >= 1200
42             && $time < 1800;
43             return 'evening1' if $time >= 1800
44             && $time < 2100;
45             return 'morning1' if $time >= 600
46             && $time < 1200;
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 'evening1' if $time >= 1800
54             && $time < 2100;
55             return 'morning1' if $time >= 600
56             && $time < 1200;
57             return 'night1' if $time >= 2100;
58             return 'night1' if $time < 600;
59             }
60             last SWITCH;
61             }
62             if ($_ eq 'gregorian') {
63             if($day_period_type eq 'default') {
64             return 'midnight' if $time == 0;
65             return 'noon' if $time == 1200;
66             return 'afternoon1' if $time >= 1200
67             && $time < 1800;
68             return 'evening1' if $time >= 1800
69             && $time < 2100;
70             return 'morning1' if $time >= 600
71             && $time < 1200;
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 'evening1' if $time >= 1800
79             && $time < 2100;
80             return 'morning1' if $time >= 600
81             && $time < 1200;
82             return 'night1' if $time >= 2100;
83             return 'night1' if $time < 600;
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             'full' => q{EEEE, d MMMM y},
121             'long' => q{d MMMM y},
122             'medium' => q{d MMM y},
123             'short' => q{d/M/y},
124             },
125             } },
126             );
127              
128             has 'time_formats' => (
129             is => 'ro',
130             isa => HashRef,
131             init_arg => undef,
132             default => sub { {
133             'generic' => {
134             },
135             'gregorian' => {
136             },
137             } },
138             );
139              
140             has 'datetime_formats' => (
141             is => 'ro',
142             isa => HashRef,
143             init_arg => undef,
144             default => sub { {
145             'generic' => {
146             },
147             'gregorian' => {
148             },
149             } },
150             );
151              
152             has 'datetime_formats_available_formats' => (
153             is => 'ro',
154             isa => HashRef,
155             init_arg => undef,
156             default => sub { {
157             'generic' => {
158             MMMMEd => q{E, d MMMM},
159             yyyyMEd => q{E, d/M/y GGGGG},
160             yyyyMMMEd => q{E, d MMM, y G},
161             yyyyMMMd => q{d MMM, y G},
162             yyyyMd => q{d/M/y GGGGG},
163             },
164             'gregorian' => {
165             MEd => q{E, d/M},
166             MMMMEd => q{E, d MMMM},
167             Md => q{d/M},
168             yM => q{M/y},
169             yMEd => q{E, d/M/y},
170             yMd => q{d/M/y},
171             },
172             } },
173             );
174              
175             has 'datetime_formats_append_item' => (
176             is => 'ro',
177             isa => HashRef,
178             init_arg => undef,
179             default => sub { {
180             } },
181             );
182              
183             has 'datetime_formats_interval' => (
184             is => 'ro',
185             isa => HashRef,
186             init_arg => undef,
187             default => sub { {
188             'generic' => {
189             MEd => {
190             M => q{E, d/M – E, d/M},
191             d => q{E, d/M – E, d/M},
192             },
193             MMMEd => {
194             M => q{E, d MMM – E, d MMM},
195             d => q{E, d MMM – E, d MMM},
196             },
197             Md => {
198             M => q{d/M – d/M},
199             d => q{d/M – d/M},
200             },
201             yMEd => {
202             M => q{E, d/M/y – E, d/M/y G},
203             d => q{E, d/M/y – E, d/M/y G},
204             y => q{E, d/M/y – E, d/M/y G},
205             },
206             yMMMEd => {
207             M => q{E, d MMM – E, d MMM, y G},
208             d => q{E, d MMM – E, d MMM, y G},
209             y => q{E, d MMM, y – E, d MMM, y G},
210             },
211             yMMMd => {
212             M => q{d MMM – d MMM, y G},
213             d => q{d – d MMM, y G},
214             y => q{d MMM, y – d MMM, y G},
215             },
216             yMd => {
217             M => q{d/M/y – d/M/y G},
218             d => q{d/M/y – d/M/y G},
219             y => q{d/M/y – d/M/y G},
220             },
221             },
222             'gregorian' => {
223             MEd => {
224             M => q{E, d/M – E, d/M},
225             d => q{E, d/M – E, d/M},
226             },
227             MMMEd => {
228             M => q{E, d MMM – E, d MMM},
229             d => q{E, d MMM – E, d MMM},
230             },
231             Md => {
232             M => q{d/M – d/M},
233             d => q{d/M – d/M},
234             },
235             yM => {
236             M => q{M/y – M/y},
237             y => q{M/y – M/y},
238             },
239             yMEd => {
240             M => q{E, d/M/y – E, d/M/y},
241             d => q{E, d/M/y – E, d/M/y},
242             y => q{E, d/M/y – E, d/M/y},
243             },
244             yMd => {
245             M => q{d/M/y – d/M/y},
246             d => q{d/M/y – d/M/y},
247             y => q{d/M/y – d/M/y},
248             },
249             },
250             } },
251             );
252              
253             has 'time_zone_names' => (
254             is => 'ro',
255             isa => HashRef,
256             init_arg => undef,
257             default => sub { {
258             'Hong_Kong' => {
259             short => {
260             'daylight' => q#HKST#,
261             'generic' => q#HKT#,
262             'standard' => q#HKT#,
263             },
264             },
265             } }
266             );
267 1     1   1965 no Moo;
  1         2  
  1         8  
268              
269             1;
270              
271             # vim: tabstop=4