File Coverage

blib/lib/Locale/CLDR/Locales/En/Any/Nz.pm
Criterion Covered Total %
statement 23 23 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod n/a
total 31 31 100.0


line stmt bran cond sub pod time code
1             =head1
2              
3             Locale::CLDR::Locales::En::Any::Nz - Package for language English
4              
5             =cut
6              
7             package Locale::CLDR::Locales::En::Any::Nz;
8             # This file auto generated from Data\common\main\en_NZ.xml
9             # on Sun 24 Apr 8:24:50 am GMT
10              
11 2     2   23127 use version;
  2         4  
  2         16  
12              
13             our $VERSION = version->declare('v0.29.0');
14              
15 2     2   199 use v5.10.1;
  2         4  
16 2     2   8 use mro 'c3';
  2         3  
  2         12  
17 2     2   67 use utf8;
  2         2  
  2         12  
18 2     2   56 use if $^V ge v5.12.0, feature => 'unicode_strings';
  2         3  
  2         29  
19              
20 2     2   204 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  2         2  
  2         16  
21 2     2   1379 use Moo;
  2         2  
  2         14  
22              
23             extends('Locale::CLDR::Locales::En::Any::001');
24             has 'display_name_language' => (
25             is => 'ro',
26             isa => CodeRef,
27             init_arg => undef,
28             default => sub {
29             sub {
30             my %languages = (
31             'mi' => 'Māori',
32              
33             );
34             if (@_) {
35             return $languages{$_[0]};
36             }
37             return \%languages;
38             }
39             },
40             );
41              
42             has 'currencies' => (
43             is => 'ro',
44             isa => HashRef,
45             init_arg => undef,
46             default => sub { {
47             'NZD' => {
48             symbol => '$',
49             },
50             } },
51             );
52              
53              
54             has 'day_period_data' => (
55             is => 'ro',
56             isa => CodeRef,
57             init_arg => undef,
58             default => sub { sub {
59             # Time in hhmm format
60             my ($self, $type, $time, $day_period_type) = @_;
61             $day_period_type //= 'default';
62             SWITCH:
63             for ($type) {
64             if ($_ eq 'generic') {
65             if($day_period_type eq 'default') {
66             return 'noon' if $time == 1200;
67             return 'midnight' if $time == 0;
68             return 'evening1' if $time >= 1800
69             && $time < 2100;
70             return 'night1' if $time >= 2100;
71             return 'night1' if $time < 600;
72             return 'afternoon1' if $time >= 1200
73             && $time < 1800;
74             return 'morning1' if $time >= 600
75             && $time < 1200;
76             }
77             if($day_period_type eq 'selection') {
78             return 'afternoon1' if $time >= 1200
79             && $time < 1800;
80             return 'morning1' if $time >= 600
81             && $time < 1200;
82             return 'night1' if $time >= 2100;
83             return 'night1' if $time < 600;
84             return 'evening1' if $time >= 1800
85             && $time < 2100;
86             }
87             last SWITCH;
88             }
89             if ($_ eq 'gregorian') {
90             if($day_period_type eq 'default') {
91             return 'noon' if $time == 1200;
92             return 'midnight' if $time == 0;
93             return 'evening1' if $time >= 1800
94             && $time < 2100;
95             return 'night1' if $time >= 2100;
96             return 'night1' if $time < 600;
97             return 'afternoon1' if $time >= 1200
98             && $time < 1800;
99             return 'morning1' if $time >= 600
100             && $time < 1200;
101             }
102             if($day_period_type eq 'selection') {
103             return 'afternoon1' if $time >= 1200
104             && $time < 1800;
105             return 'morning1' if $time >= 600
106             && $time < 1200;
107             return 'night1' if $time >= 2100;
108             return 'night1' if $time < 600;
109             return 'evening1' if $time >= 1800
110             && $time < 2100;
111             }
112             last SWITCH;
113             }
114             }
115             } },
116             );
117              
118             around day_period_data => sub {
119             my ($orig, $self) = @_;
120             return $self->$orig;
121             };
122              
123             has 'eras' => (
124             is => 'ro',
125             isa => HashRef,
126             init_arg => undef,
127             default => sub { {
128             'generic' => {
129             },
130             'gregorian' => {
131             },
132             } },
133             );
134              
135             has 'date_formats' => (
136             is => 'ro',
137             isa => HashRef,
138             init_arg => undef,
139             default => sub { {
140             'generic' => {
141             'medium' => q{d/MM/y G},
142             'short' => q{d/MM/y GGGGG},
143             },
144             'gregorian' => {
145             'medium' => q{d/MM/y},
146             'short' => q{d/MM/yy},
147             },
148             } },
149             );
150              
151             has 'time_formats' => (
152             is => 'ro',
153             isa => HashRef,
154             init_arg => undef,
155             default => sub { {
156             'generic' => {
157             },
158             'gregorian' => {
159             },
160             } },
161             );
162              
163             has 'datetime_formats' => (
164             is => 'ro',
165             isa => HashRef,
166             init_arg => undef,
167             default => sub { {
168             'generic' => {
169             },
170             'gregorian' => {
171             },
172             } },
173             );
174              
175             has 'datetime_formats_available_formats' => (
176             is => 'ro',
177             isa => HashRef,
178             init_arg => undef,
179             default => sub { {
180             'generic' => {
181             Md => q{d/M},
182             yyyyMd => q{d/MM/y G},
183             },
184             'gregorian' => {
185             Md => q{d/M},
186             yMd => q{d/MM/y},
187             },
188             } },
189             );
190              
191             has 'datetime_formats_append_item' => (
192             is => 'ro',
193             isa => HashRef,
194             init_arg => undef,
195             default => sub { {
196             } },
197             );
198              
199             has 'datetime_formats_interval' => (
200             is => 'ro',
201             isa => HashRef,
202             init_arg => undef,
203             default => sub { {
204             'generic' => {
205             MEd => {
206             M => q{E, d/MM – E, d/MM},
207             d => q{E, d/MM – E, d/MM},
208             },
209             MMMEd => {
210             M => q{E, d MMM – E, d MMM},
211             d => q{E, d – E, d MMM},
212             },
213             Md => {
214             M => q{d/MM – d/MM},
215             d => q{d/MM – d/MM},
216             },
217             yM => {
218             M => q{MM/y – MM/y G},
219             y => q{MM/y – MM/y G},
220             },
221             yMEd => {
222             M => q{E, d/MM/y – E, d/MM/y G},
223             d => q{E, d/MM/y – E, d/MM/y G},
224             y => q{E, d/MM/y – E, d/MM/y G},
225             },
226             yMd => {
227             M => q{d/MM/y – d/MM/y G},
228             d => q{d/MM/y – d/MM/y G},
229             y => q{d/MM/y – d/MM/y G},
230             },
231             },
232             'gregorian' => {
233             MEd => {
234             M => q{E, d/MM – E, d/MM},
235             d => q{E, d/MM – E, d/MM},
236             },
237             MMMEd => {
238             M => q{E, d MMM – E, d MMM},
239             d => q{E, d – E, d MMM},
240             },
241             Md => {
242             M => q{d/MM – d/MM},
243             d => q{d/MM – d/MM},
244             },
245             yMEd => {
246             M => q{E, d/MM/y – E, d/MM/y},
247             d => q{E, d/MM/y – E, d/MM/y},
248             y => q{E, d/MM/y – E, d/MM/y},
249             },
250             yMd => {
251             M => q{d/MM/y – d/MM/y},
252             d => q{d/MM/y – d/MM/y},
253             y => q{d/MM/y – d/MM/y},
254             },
255             },
256             } },
257             );
258              
259             has 'time_zone_names' => (
260             is => 'ro',
261             isa => HashRef,
262             init_arg => undef,
263             default => sub { {
264             'Australia_Central' => {
265             short => {
266             'daylight' => q(ACDT),
267             'generic' => q(ACT),
268             'standard' => q(ACST),
269             },
270             },
271             'Australia_CentralWestern' => {
272             short => {
273             'daylight' => q(ACWDT),
274             'generic' => q(ACWT),
275             'standard' => q(ACWST),
276             },
277             },
278             'Australia_Eastern' => {
279             short => {
280             'daylight' => q(AEDT),
281             'generic' => q(AET),
282             'standard' => q(AEST),
283             },
284             },
285             'Australia_Western' => {
286             short => {
287             'daylight' => q(AWDT),
288             'generic' => q(AWT),
289             'standard' => q(AWST),
290             },
291             },
292             'Chatham' => {
293             short => {
294             'daylight' => q(CHADT),
295             'generic' => q(CHAT),
296             'standard' => q(CHAST),
297             },
298             },
299             'Lord_Howe' => {
300             short => {
301             'daylight' => q(LHDT),
302             'generic' => q(LHT),
303             'standard' => q(LHST),
304             },
305             },
306             'New_Zealand' => {
307             short => {
308             'daylight' => q(NZDT),
309             'generic' => q(NZT),
310             'standard' => q(NZST),
311             },
312             },
313             } }
314             );
315 2     2   5256 no Moo;
  2         2  
  2         10  
316              
317             1;
318              
319             # vim: tabstop=4