File Coverage

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