File Coverage

blib/lib/Locale/CLDR/Locales/En/Any/Nu.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::Nu - Package for language English
4              
5             =cut
6              
7             package Locale::CLDR::Locales::En::Any::Nu;
8             # This file auto generated from Data\common\main\en_NU.xml
9             # on Sun 24 Apr 8:24:50 am GMT
10              
11 1     1   805 use version;
  1         2  
  1         5  
12              
13             our $VERSION = version->declare('v0.29.0');
14              
15 1     1   77 use v5.10.1;
  1         2  
16 1     1   4 use mro 'c3';
  1         2  
  1         4  
17 1     1   29 use utf8;
  1         0  
  1         9  
18 1     1   27 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         2  
  1         9  
19              
20 1     1   76 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         1  
  1         10  
21 1     1   644 use Moo;
  1         1  
  1         5  
22              
23             extends('Locale::CLDR::Locales::En::Any::001');
24             has 'currencies' => (
25             is => 'ro',
26             isa => HashRef,
27             init_arg => undef,
28             default => sub { {
29             'NZD' => {
30             symbol => '$',
31             },
32             } },
33             );
34              
35              
36             has 'day_period_data' => (
37             is => 'ro',
38             isa => CodeRef,
39             init_arg => undef,
40             default => sub { sub {
41             # Time in hhmm format
42             my ($self, $type, $time, $day_period_type) = @_;
43             $day_period_type //= 'default';
44             SWITCH:
45             for ($type) {
46             if ($_ eq 'gregorian') {
47             if($day_period_type eq 'default') {
48             return 'noon' if $time == 1200;
49             return 'midnight' if $time == 0;
50             return 'evening1' if $time >= 1800
51             && $time < 2100;
52             return 'night1' if $time >= 2100;
53             return 'night1' if $time < 600;
54             return 'afternoon1' if $time >= 1200
55             && $time < 1800;
56             return 'morning1' if $time >= 600
57             && $time < 1200;
58             }
59             if($day_period_type eq 'selection') {
60             return 'afternoon1' if $time >= 1200
61             && $time < 1800;
62             return 'morning1' if $time >= 600
63             && $time < 1200;
64             return 'night1' if $time >= 2100;
65             return 'night1' if $time < 600;
66             return 'evening1' if $time >= 1800
67             && $time < 2100;
68             }
69             last SWITCH;
70             }
71             }
72             } },
73             );
74              
75             around day_period_data => sub {
76             my ($orig, $self) = @_;
77             return $self->$orig;
78             };
79              
80             has 'eras' => (
81             is => 'ro',
82             isa => HashRef,
83             init_arg => undef,
84             default => sub { {
85             'gregorian' => {
86             },
87             } },
88             );
89              
90             has 'date_formats' => (
91             is => 'ro',
92             isa => HashRef,
93             init_arg => undef,
94             default => sub { {
95             'gregorian' => {
96             },
97             } },
98             );
99              
100             has 'time_formats' => (
101             is => 'ro',
102             isa => HashRef,
103             init_arg => undef,
104             default => sub { {
105             'gregorian' => {
106             'full' => q{HH:mm:ss zzzz},
107             'long' => q{HH:mm:ss z},
108             'medium' => q{HH:mm:ss},
109             'short' => q{HH:mm},
110             },
111             } },
112             );
113              
114             has 'datetime_formats' => (
115             is => 'ro',
116             isa => HashRef,
117             init_arg => undef,
118             default => sub { {
119             'gregorian' => {
120             },
121             } },
122             );
123              
124             has 'datetime_formats_available_formats' => (
125             is => 'ro',
126             isa => HashRef,
127             init_arg => undef,
128             default => sub { {
129             } },
130             );
131              
132             has 'datetime_formats_append_item' => (
133             is => 'ro',
134             isa => HashRef,
135             init_arg => undef,
136             default => sub { {
137             } },
138             );
139              
140             has 'datetime_formats_interval' => (
141             is => 'ro',
142             isa => HashRef,
143             init_arg => undef,
144             default => sub { {
145             } },
146             );
147              
148 1     1   2078 no Moo;
  1         3  
  1         3  
149              
150             1;
151              
152             # vim: tabstop=4