File Coverage

blib/lib/Locale/CLDR/Locales/En/Any/Bw.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::Any::Bw - Package for language English
6              
7             =cut
8              
9             package Locale::CLDR::Locales::En::Any::Bw;
10             # This file auto generated from Data\common\main\en_BW.xml
11             # on Fri 13 Oct 9:13:13 am GMT
12              
13 1     1   876 use strict;
  1         2  
  1         24  
14 1     1   4 use warnings;
  1         2  
  1         20  
15 1     1   5 use version;
  1         2  
  1         4  
16              
17             our $VERSION = version->declare('v0.34.2');
18              
19 1     1   87 use v5.10.1;
  1         3  
20 1     1   6 use mro 'c3';
  1         1  
  1         6  
21 1     1   22 use utf8;
  1         2  
  1         4  
22 1     1   38 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         2  
  1         10  
23 1     1   85 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         5  
24 1     1   880 use Moo;
  1         2  
  1         5  
25              
26             extends('Locale::CLDR::Locales::En::Any::001');
27             has 'currencies' => (
28             is => 'ro',
29             isa => HashRef,
30             init_arg => undef,
31             default => sub { {
32             'BWP' => {
33             symbol => 'P',
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             'full' => q{EEEE, dd MMMM y G},
127             'long' => q{dd MMMM y G},
128             'medium' => q{dd MMM y G},
129             },
130             'gregorian' => {
131             'full' => q{EEEE, dd MMMM y},
132             'long' => q{dd MMMM y},
133             'medium' => q{dd MMM y},
134             'short' => q{dd/MM/yy},
135             },
136             } },
137             );
138              
139             has 'time_formats' => (
140             is => 'ro',
141             isa => HashRef,
142             init_arg => undef,
143             default => sub { {
144             'generic' => {
145             },
146             'gregorian' => {
147             'full' => q{HH:mm:ss zzzz},
148             'long' => q{HH:mm:ss z},
149             'medium' => q{HH:mm:ss},
150             'short' => q{HH:mm},
151             },
152             } },
153             );
154              
155             has 'datetime_formats' => (
156             is => 'ro',
157             isa => HashRef,
158             init_arg => undef,
159             default => sub { {
160             'generic' => {
161             },
162             'gregorian' => {
163             },
164             } },
165             );
166              
167             has 'datetime_formats_available_formats' => (
168             is => 'ro',
169             isa => HashRef,
170             init_arg => undef,
171             default => sub { {
172             'generic' => {
173             GyMMMEd => q{E, dd MMM y G},
174             GyMMMd => q{dd MMM y G},
175             MMMEd => q{E, dd MMM},
176             MMMd => q{dd MMM},
177             MMdd => q{dd/MM},
178             yyyyM => q{MM/y G},
179             yyyyMEd => q{E, dd/MM/y G},
180             yyyyMMMEd => q{E, dd MMM y G},
181             yyyyMMMd => q{dd MMM y G},
182             yyyyMd => q{dd/MM/y G},
183             },
184             'gregorian' => {
185             GyMMMEd => q{E, dd MMM y G},
186             GyMMMd => q{dd MMM y G},
187             MMMEd => q{E, dd MMM},
188             MMMd => q{dd MMM},
189             yMMMEd => q{E, dd MMM y},
190             yMMMd => q{dd MMM y},
191             },
192             } },
193             );
194              
195             has 'datetime_formats_append_item' => (
196             is => 'ro',
197             isa => HashRef,
198             init_arg => undef,
199             default => sub { {
200             } },
201             );
202              
203             has 'datetime_formats_interval' => (
204             is => 'ro',
205             isa => HashRef,
206             init_arg => undef,
207             default => sub { {
208             'generic' => {
209             MMMEd => {
210             M => q{E dd MMM – E dd MMM},
211             d => q{E dd – E dd MMM},
212             },
213             MMMd => {
214             M => q{dd MMM – dd MMM},
215             d => q{dd–dd MMM},
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 dd/MM/y – E dd/MM/y G},
223             d => q{E dd/MM/y – E dd/MM/y G},
224             y => q{E dd/MM/y – E dd/MM/y G},
225             },
226             yMMMEd => {
227             M => q{E, dd MMM – E, dd MMM y G},
228             d => q{E, dd – E, dd MMM y G},
229             y => q{E, dd MMM y – E, dd MMM y G},
230             },
231             yMMMd => {
232             M => q{dd MMM – dd MMM y G},
233             d => q{dd – dd MMM y G},
234             y => q{dd MMM y – dd MMM y G},
235             },
236             yMd => {
237             M => q{dd/MM/y – dd/MM/y G},
238             d => q{dd/MM/y – dd/MM/y G},
239             y => q{dd/MM/y – dd/MM/y G},
240             },
241             },
242             'gregorian' => {
243             MMMEd => {
244             M => q{E dd MMM – E dd MMM},
245             d => q{E dd – E dd MMM},
246             },
247             MMMd => {
248             M => q{dd MMM – dd MMM},
249             d => q{dd – dd MMM},
250             },
251             yMEd => {
252             M => q{E dd/MM/y – E dd/MM/y},
253             d => q{E dd/MM/y – E dd/MM/y},
254             y => q{E dd/MM/y – E dd/MM/y},
255             },
256             yMMMEd => {
257             M => q{E, dd MMM – E, dd MMM y},
258             d => q{E, dd – E, dd MMM y},
259             y => q{E, dd MMM y – E, dd MMM y},
260             },
261             yMMMd => {
262             M => q{dd MMM – dd MMM y},
263             d => q{dd – dd MMM y},
264             y => q{dd MMM y – dd MMM y},
265             },
266             },
267             } },
268             );
269              
270             has 'time_zone_names' => (
271             is => 'ro',
272             isa => HashRef,
273             init_arg => undef,
274             default => sub { {
275             'Africa_Central' => {
276             short => {
277             'standard' => q#CAT#,
278             },
279             },
280             'Africa_Eastern' => {
281             short => {
282             'standard' => q#EAT#,
283             },
284             },
285             'Africa_Southern' => {
286             short => {
287             'standard' => q#SAST#,
288             },
289             },
290             'Africa_Western' => {
291             short => {
292             'daylight' => q#WAST#,
293             'generic' => q#WAT#,
294             'standard' => q#WAT#,
295             },
296             },
297             } }
298             );
299 1     1   1189 no Moo;
  1         2  
  1         4  
300              
301             1;
302              
303             # vim: tabstop=4