File Coverage

blib/lib/Locale/CLDR/Locales/En/Any/Jm.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
4              
5             Locale::CLDR::Locales::En::Any::Jm - Package for language English
6              
7             =cut
8              
9             # This file auto generated from Data/common/main/en_JM.xml
10             # on Mon 11 Apr 5:27:05 pm GMT
11              
12             use strict;
13 1     1   804 use warnings;
  1         2  
  1         23  
14 1     1   5 use version;
  1         2  
  1         17  
15 1     1   5  
  1         2  
  1         4  
16             our $VERSION = version->declare('v0.34.1');
17              
18             use v5.10.1;
19 1     1   76 use mro 'c3';
  1         3  
20 1     1   5 use utf8;
  1         1  
  1         4  
21 1     1   19 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         2  
  1         5  
22 1     1   36 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         10  
23 1     1   97 use Moo;
  1         2  
  1         13  
24 1     1   760  
  1         2  
  1         5  
25             extends('Locale::CLDR::Locales::En::Any::001');
26             has 'currencies' => (
27             is => 'ro',
28             isa => HashRef,
29             init_arg => undef,
30             default => sub { {
31             'JMD' => {
32             symbol => '$',
33             },
34             } },
35             );
36              
37              
38             has 'day_period_data' => (
39             is => 'ro',
40             isa => CodeRef,
41             init_arg => undef,
42             default => sub { sub {
43             # Time in hhmm format
44             my ($self, $type, $time, $day_period_type) = @_;
45             $day_period_type //= 'default';
46             SWITCH:
47             for ($type) {
48             if ($_ eq 'generic') {
49             if($day_period_type eq 'default') {
50             return 'midnight' if $time == 0;
51             return 'noon' if $time == 1200;
52             return 'afternoon1' if $time >= 1200
53             && $time < 1800;
54             return 'evening1' if $time >= 1800
55             && $time < 2100;
56             return 'morning1' if $time >= 600
57             && $time < 1200;
58             return 'night1' if $time >= 2100;
59             return 'night1' if $time < 600;
60             }
61             if($day_period_type eq 'selection') {
62             return 'afternoon1' if $time >= 1200
63             && $time < 1800;
64             return 'evening1' if $time >= 1800
65             && $time < 2100;
66             return 'morning1' if $time >= 600
67             && $time < 1200;
68             return 'night1' if $time >= 2100;
69             return 'night1' if $time < 600;
70             }
71             last SWITCH;
72             }
73             if ($_ eq 'gregorian') {
74             if($day_period_type eq 'default') {
75             return 'midnight' if $time == 0;
76             return 'noon' if $time == 1200;
77             return 'afternoon1' if $time >= 1200
78             && $time < 1800;
79             return 'evening1' if $time >= 1800
80             && $time < 2100;
81             return 'morning1' if $time >= 600
82             && $time < 1200;
83             return 'night1' if $time >= 2100;
84             return 'night1' if $time < 600;
85             }
86             if($day_period_type eq 'selection') {
87             return 'afternoon1' if $time >= 1200
88             && $time < 1800;
89             return 'evening1' if $time >= 1800
90             && $time < 2100;
91             return 'morning1' if $time >= 600
92             && $time < 1200;
93             return 'night1' if $time >= 2100;
94             return 'night1' if $time < 600;
95             }
96             last SWITCH;
97             }
98             }
99             } },
100             );
101              
102             around day_period_data => sub {
103             my ($orig, $self) = @_;
104             return $self->$orig;
105             };
106              
107             has 'eras' => (
108             is => 'ro',
109             isa => HashRef,
110             init_arg => undef,
111             default => sub { {
112             'generic' => {
113             },
114             'gregorian' => {
115             },
116             } },
117             );
118              
119             has 'date_formats' => (
120             is => 'ro',
121             isa => HashRef,
122             init_arg => undef,
123             default => sub { {
124             'generic' => {
125             'short' => q{d/M/y GGGGG},
126             },
127             'gregorian' => {
128             'short' => q{d/M/yy},
129             },
130             } },
131             );
132              
133             has 'time_formats' => (
134             is => 'ro',
135             isa => HashRef,
136             init_arg => undef,
137             default => sub { {
138             'generic' => {
139             },
140             'gregorian' => {
141             },
142             } },
143             );
144              
145             has 'datetime_formats' => (
146             is => 'ro',
147             isa => HashRef,
148             init_arg => undef,
149             default => sub { {
150             'generic' => {
151             },
152             'gregorian' => {
153             },
154             } },
155             );
156              
157             has 'datetime_formats_available_formats' => (
158             is => 'ro',
159             isa => HashRef,
160             init_arg => undef,
161             default => sub { {
162             'generic' => {
163             Md => q{d/M},
164             yyyyMEd => q{E, d/M/y G},
165             },
166             'gregorian' => {
167             MEd => q{E, d/M},
168             Md => q{d/M},
169             yMEd => q{E, d/M/y},
170             },
171             } },
172             );
173              
174             has 'datetime_formats_append_item' => (
175             is => 'ro',
176             isa => HashRef,
177             init_arg => undef,
178             default => sub { {
179             } },
180             );
181              
182             has 'datetime_formats_interval' => (
183             is => 'ro',
184             isa => HashRef,
185             init_arg => undef,
186             default => sub { {
187             'generic' => {
188             MEd => {
189             M => q{E, d/M – E, d/M},
190             d => q{E, d/M – E, d/M},
191             },
192             Md => {
193             M => q{d/M – d/M},
194             d => q{d/M – d/M},
195             },
196             yMEd => {
197             M => q{E, d/M/y – E, d/M/y G},
198             d => q{E, d/M/y – E, d/M/y G},
199             y => q{E, d/M/y – E, d/M/y G},
200             },
201             yMd => {
202             M => q{d/M/y – d/M/y G},
203             d => q{d/M/y – d/M/y G},
204             y => q{d/M/y – d/M/y G},
205             },
206             },
207             'gregorian' => {
208             MEd => {
209             M => q{E, d/M – E, d/M},
210             d => q{E, d/M – E, d/M},
211             },
212             Md => {
213             M => q{d/M – d/M},
214             d => q{d/M – d/M},
215             },
216             yMEd => {
217             M => q{E, d/M/y – E, d/M/y},
218             d => q{E, d/M/y – E, d/M/y},
219             y => q{E, d/M/y – E, d/M/y},
220             },
221             yMd => {
222             M => q{d/M/y – d/M/y},
223             d => q{d/M/y – d/M/y},
224             y => q{d/M/y – d/M/y},
225             },
226             },
227             } },
228             );
229              
230             no Moo;
231 1     1   1049  
  1         2  
  1         4  
232             1;
233              
234             # vim: tabstop=4