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 NAME
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 Fri 13 Oct 9:13:20 am GMT
12              
13 1     1   883 use strict;
  1         2  
  1         25  
14 1     1   5 use warnings;
  1         1  
  1         21  
15 1     1   3 use version;
  1         3  
  1         4  
16              
17             our $VERSION = version->declare('v0.34.2');
18              
19 1     1   83 use v5.10.1;
  1         4  
20 1     1   5 use mro 'c3';
  1         2  
  1         5  
21 1     1   31 use utf8;
  1         2  
  1         5  
22 1     1   27 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         2  
  1         9  
23 1     1   107 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         5  
24 1     1   871 use Moo;
  1         12  
  1         6  
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 '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             '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             'generic' => {
155             MMMMEd => q{E, d MMMM},
156             yyyyMEd => q{E, d/M/y GGGGG},
157             yyyyMMMEd => q{E, d MMM, y G},
158             yyyyMMMd => q{d MMM, y G},
159             yyyyMd => q{d/M/y GGGGG},
160             },
161             'gregorian' => {
162             MEd => q{E, d/M},
163             MMMMEd => q{E, d MMMM},
164             Md => q{d/M},
165             yM => q{M/y},
166             yMEd => q{E, d/M/y},
167             yMd => q{d/M/y},
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             'generic' => {
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             yMEd => {
199             M => q{E, d/M/y – E, d/M/y G},
200             d => q{E, d/M/y – E, d/M/y G},
201             y => q{E, d/M/y – E, d/M/y G},
202             },
203             yMMMEd => {
204             M => q{E, d MMM – E, d MMM, y G},
205             d => q{E, d MMM – E, d MMM, y G},
206             y => q{E, d MMM, y – E, d MMM, y G},
207             },
208             yMMMd => {
209             M => q{d MMM – d MMM, y G},
210             d => q{d – d MMM, y G},
211             y => q{d MMM, y – d MMM, y G},
212             },
213             yMd => {
214             M => q{d/M/y – d/M/y G},
215             d => q{d/M/y – d/M/y G},
216             y => q{d/M/y – d/M/y G},
217             },
218             },
219             'gregorian' => {
220             MEd => {
221             M => q{E, d/M – E, d/M},
222             d => q{E, d/M – E, d/M},
223             },
224             MMMEd => {
225             M => q{E, d MMM – E, d MMM},
226             d => q{E, d MMM – E, d MMM},
227             },
228             Md => {
229             M => q{d/M – d/M},
230             d => q{d/M – d/M},
231             },
232             yM => {
233             M => q{M/y – M/y},
234             y => q{M/y – M/y},
235             },
236             yMEd => {
237             M => q{E, d/M/y – E, d/M/y},
238             d => q{E, d/M/y – E, d/M/y},
239             y => q{E, d/M/y – E, d/M/y},
240             },
241             yMd => {
242             M => q{d/M/y – d/M/y},
243             d => q{d/M/y – d/M/y},
244             y => q{d/M/y – d/M/y},
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   1087 no Moo;
  1         2  
  1         5  
265              
266             1;
267              
268             # vim: tabstop=4