File Coverage

blib/lib/Locale/CLDR/Locales/En/Latn/Ch.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::Ch - Package for language English
6              
7             =cut
8              
9             package Locale::CLDR::Locales::En::Latn::Ch;
10             # This file auto generated from Data\common\main\en_CH.xml
11             # on Fri 17 Jan 12:03:31 pm GMT
12              
13 1     1   1519 use strict;
  1         3  
  1         46  
14 1     1   5 use warnings;
  1         3  
  1         60  
15 1     1   7 use version;
  1         2  
  1         6  
16              
17             our $VERSION = version->declare('v0.46.0');
18              
19 1     1   199 use v5.12.0;
  1         4  
20 1     1   8 use mro 'c3';
  1         2  
  1         9  
21 1     1   28 use utf8;
  1         1  
  1         7  
22 1     1   35 use feature 'unicode_strings';
  1         2  
  1         126  
23 1     1   7 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         1  
  1         15  
24 1     1   2132 use Moo;
  1         3  
  1         7  
25              
26             extends('Locale::CLDR::Locales::En::Latn::150');
27             has 'number_symbols' => (
28             is => 'ro',
29             isa => HashRef,
30             init_arg => undef,
31             default => sub { {
32             'latn' => {
33             'group' => q(’),
34             'superscriptingExponent' => q(·),
35             },
36             } }
37             );
38              
39             has 'number_currency_formats' => (
40             is => 'ro',
41             isa => HashRef,
42             init_arg => undef,
43             default => sub { {
44             'latn' => {
45             'pattern' => {
46             'default' => {
47             'accounting' => {
48             'negative' => '¤-#,##0.00',
49             'positive' => '¤ #,##0.00',
50             },
51             'standard' => {
52             'negative' => '¤-#,##0.00',
53             'positive' => '¤ #,##0.00',
54             },
55             },
56             },
57             },
58             } },
59             );
60              
61             has 'day_period_data' => (
62             is => 'ro',
63             isa => CodeRef,
64             init_arg => undef,
65             default => sub { sub {
66             # Time in hhmm format
67             my ($self, $type, $time, $day_period_type) = @_;
68             $day_period_type //= 'default';
69             SWITCH:
70             for ($type) {
71             if ($_ eq 'chinese') {
72             if($day_period_type eq 'default') {
73             return 'midnight' if $time == 0;
74             return 'noon' if $time == 1200;
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             if($day_period_type eq 'selection') {
85             return 'afternoon1' if $time >= 1200
86             && $time < 1800;
87             return 'evening1' if $time >= 1800
88             && $time < 2100;
89             return 'morning1' if $time >= 600
90             && $time < 1200;
91             return 'night1' if $time >= 2100;
92             return 'night1' if $time < 600;
93             }
94             last SWITCH;
95             }
96             if ($_ eq 'dangi') {
97             if($day_period_type eq 'default') {
98             return 'midnight' if $time == 0;
99             return 'noon' if $time == 1200;
100             return 'afternoon1' if $time >= 1200
101             && $time < 1800;
102             return 'evening1' if $time >= 1800
103             && $time < 2100;
104             return 'morning1' if $time >= 600
105             && $time < 1200;
106             return 'night1' if $time >= 2100;
107             return 'night1' if $time < 600;
108             }
109             if($day_period_type eq 'selection') {
110             return 'afternoon1' if $time >= 1200
111             && $time < 1800;
112             return 'evening1' if $time >= 1800
113             && $time < 2100;
114             return 'morning1' if $time >= 600
115             && $time < 1200;
116             return 'night1' if $time >= 2100;
117             return 'night1' if $time < 600;
118             }
119             last SWITCH;
120             }
121             if ($_ eq 'generic') {
122             if($day_period_type eq 'default') {
123             return 'midnight' if $time == 0;
124             return 'noon' if $time == 1200;
125             return 'afternoon1' if $time >= 1200
126             && $time < 1800;
127             return 'evening1' if $time >= 1800
128             && $time < 2100;
129             return 'morning1' if $time >= 600
130             && $time < 1200;
131             return 'night1' if $time >= 2100;
132             return 'night1' if $time < 600;
133             }
134             if($day_period_type eq 'selection') {
135             return 'afternoon1' if $time >= 1200
136             && $time < 1800;
137             return 'evening1' if $time >= 1800
138             && $time < 2100;
139             return 'morning1' if $time >= 600
140             && $time < 1200;
141             return 'night1' if $time >= 2100;
142             return 'night1' if $time < 600;
143             }
144             last SWITCH;
145             }
146             if ($_ eq 'gregorian') {
147             if($day_period_type eq 'default') {
148             return 'midnight' if $time == 0;
149             return 'noon' if $time == 1200;
150             return 'afternoon1' if $time >= 1200
151             && $time < 1800;
152             return 'evening1' if $time >= 1800
153             && $time < 2100;
154             return 'morning1' if $time >= 600
155             && $time < 1200;
156             return 'night1' if $time >= 2100;
157             return 'night1' if $time < 600;
158             }
159             if($day_period_type eq 'selection') {
160             return 'afternoon1' if $time >= 1200
161             && $time < 1800;
162             return 'evening1' if $time >= 1800
163             && $time < 2100;
164             return 'morning1' if $time >= 600
165             && $time < 1200;
166             return 'night1' if $time >= 2100;
167             return 'night1' if $time < 600;
168             }
169             last SWITCH;
170             }
171             if ($_ eq 'islamic') {
172             if($day_period_type eq 'default') {
173             return 'midnight' if $time == 0;
174             return 'noon' if $time == 1200;
175             return 'afternoon1' if $time >= 1200
176             && $time < 1800;
177             return 'evening1' if $time >= 1800
178             && $time < 2100;
179             return 'morning1' if $time >= 600
180             && $time < 1200;
181             return 'night1' if $time >= 2100;
182             return 'night1' if $time < 600;
183             }
184             if($day_period_type eq 'selection') {
185             return 'afternoon1' if $time >= 1200
186             && $time < 1800;
187             return 'evening1' if $time >= 1800
188             && $time < 2100;
189             return 'morning1' if $time >= 600
190             && $time < 1200;
191             return 'night1' if $time >= 2100;
192             return 'night1' if $time < 600;
193             }
194             last SWITCH;
195             }
196             if ($_ eq 'japanese') {
197             if($day_period_type eq 'default') {
198             return 'midnight' if $time == 0;
199             return 'noon' if $time == 1200;
200             return 'afternoon1' if $time >= 1200
201             && $time < 1800;
202             return 'evening1' if $time >= 1800
203             && $time < 2100;
204             return 'morning1' if $time >= 600
205             && $time < 1200;
206             return 'night1' if $time >= 2100;
207             return 'night1' if $time < 600;
208             }
209             if($day_period_type eq 'selection') {
210             return 'afternoon1' if $time >= 1200
211             && $time < 1800;
212             return 'evening1' if $time >= 1800
213             && $time < 2100;
214             return 'morning1' if $time >= 600
215             && $time < 1200;
216             return 'night1' if $time >= 2100;
217             return 'night1' if $time < 600;
218             }
219             last SWITCH;
220             }
221             }
222             } },
223             );
224              
225             around day_period_data => sub {
226             my ($orig, $self) = @_;
227             return $self->$orig;
228             };
229              
230             has 'eras' => (
231             is => 'ro',
232             isa => HashRef,
233             init_arg => undef,
234             default => sub { {
235             'chinese' => {
236             },
237             'dangi' => {
238             },
239             'generic' => {
240             },
241             'gregorian' => {
242             },
243             'islamic' => {
244             },
245             'japanese' => {
246             },
247             } },
248             );
249              
250             has 'date_formats' => (
251             is => 'ro',
252             isa => HashRef,
253             init_arg => undef,
254             default => sub { {
255             'chinese' => {
256             'short' => q{dd.MM.r},
257             },
258             'dangi' => {
259             },
260             'generic' => {
261             'short' => q{dd.MM.y GGGGG},
262             },
263             'gregorian' => {
264             'short' => q{dd.MM.y},
265             },
266             'islamic' => {
267             'short' => q{dd.MM.y GGGGG},
268             },
269             'japanese' => {
270             'short' => q{M.d.y GGGGG},
271             },
272             } },
273             );
274              
275             has 'time_formats' => (
276             is => 'ro',
277             isa => HashRef,
278             init_arg => undef,
279             default => sub { {
280             'chinese' => {
281             },
282             'dangi' => {
283             },
284             'generic' => {
285             },
286             'gregorian' => {
287             },
288             'islamic' => {
289             },
290             'japanese' => {
291             },
292             } },
293             );
294              
295             has 'datetime_formats' => (
296             is => 'ro',
297             isa => HashRef,
298             init_arg => undef,
299             default => sub { {
300             'chinese' => {
301             },
302             'dangi' => {
303             },
304             'generic' => {
305             },
306             'gregorian' => {
307             },
308             'islamic' => {
309             },
310             'japanese' => {
311             },
312             } },
313             );
314              
315             has 'datetime_formats_available_formats' => (
316             is => 'ro',
317             isa => HashRef,
318             init_arg => undef,
319             default => sub { {
320             'chinese' => {
321             MEd => q{E, dd.MM},
322             UM => q{M.U},
323             UMd => q{dd.MM.U},
324             yyyyM => q{MM.r},
325             yyyyMEd => q{E, dd.MM.r},
326             yyyyMd => q{dd.MM.r},
327             },
328             'dangi' => {
329             Md => q{dd.MM},
330             },
331             'generic' => {
332             GyMd => q{dd.MM.y GGGGG},
333             MEd => q{E, dd.MM},
334             Md => q{dd.MM},
335             yyyyM => q{MM.y GGGGG},
336             yyyyMEd => q{E, dd.MM.y GGGGG},
337             yyyyMd => q{dd.MM.y GGGGG},
338             },
339             'gregorian' => {
340             GyMd => q{d.M.y G},
341             MEd => q{E, dd.MM},
342             MMdd => q{dd.MM},
343             Md => q{dd.MM},
344             yM => q{MM.y},
345             yMEd => q{E, dd.MM.y},
346             yMd => q{dd.MM.y},
347             },
348             'islamic' => {
349             GyMd => q{dd.MM.y GGGGG},
350             MEd => q{E dd.MM},
351             Md => q{dd.MM},
352             yyyyM => q{MM.y GGGGG},
353             yyyyMEd => q{E, dd.MM.y GGGGG},
354             yyyyMd => q{dd.MM.y GGGGG},
355             },
356             } },
357             );
358              
359             has 'datetime_formats_append_item' => (
360             is => 'ro',
361             isa => HashRef,
362             init_arg => undef,
363             default => sub { {
364             } },
365             );
366              
367             has 'datetime_formats_interval' => (
368             is => 'ro',
369             isa => HashRef,
370             init_arg => undef,
371             default => sub { {
372             } },
373             );
374              
375 1     1   2200 no Moo;
  1         2  
  1         6  
376              
377             1;
378              
379             # vim: tabstop=4