File Coverage

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