File Coverage

blib/lib/Locale/CLDR/Locales/Sr/Latn/Ba.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::Sr::Latn::Ba - Package for language Serbian
6              
7             =cut
8              
9             # This file auto generated from Data/common/main/sr_Latn_BA.xml
10             # on Mon 11 Apr 5:38:40 pm GMT
11              
12             use strict;
13 1     1   1176 use warnings;
  1         1  
  1         26  
14 1     1   4 use version;
  1         2  
  1         25  
15 1     1   4  
  1         2  
  1         7  
16             our $VERSION = version->declare('v0.34.1');
17              
18             use v5.10.1;
19 1     1   93 use mro 'c3';
  1         3  
20 1     1   4 use utf8;
  1         3  
  1         9  
21 1     1   43 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         2  
  1         8  
22 1     1   30 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         17  
23 1     1   170 use Moo;
  1         3  
  1         10  
24 1     1   934  
  1         1  
  1         7  
25             extends('Locale::CLDR::Locales::Sr::Latn');
26             has 'display_name_language' => (
27             is => 'ro',
28             isa => CodeRef,
29             init_arg => undef,
30             default => sub {
31             sub {
32             my %languages = (
33             'arn' => 'mapudungun',
34             'be' => 'bjeloruski',
35             'bm' => 'bamanankan',
36             'bn' => 'bangla',
37             'gsw' => 'švajcarski nemački',
38             'ht' => 'haićanski kreolski',
39             'lo' => 'laoški',
40             'moh' => 'mohok',
41             'nqo' => 'n’ko',
42             'shi' => 'južni šilha',
43             'si' => 'sinhalski',
44             'tzm' => 'centralnoatlaski tamašek',
45             'xh' => 'isikosa',
46             'zgh' => 'standardni marokanski tamašek',
47             'zu' => 'isizulu',
48              
49             );
50             if (@_) {
51             return $languages{$_[0]};
52             }
53             return \%languages;
54             }
55             },
56             );
57              
58             has 'display_name_region' => (
59             is => 'ro',
60             isa => HashRef[Str],
61             init_arg => undef,
62             default => sub {
63             {
64             'BY' => 'Bjelorusija',
65             'CG' => 'Kongo',
66             'CV' => 'Kabo Verde',
67             'CZ' => 'Češka Republika',
68             'DE' => 'Njemačka',
69             'KN' => 'Sveti Kits i Nevis',
70             'MK@alt=variant' => 'BJR Makedonija',
71             'MO' => 'SAR Makao',
72             'PM' => 'Sveti Pjer i Mikelon',
73             'RE' => 'Reunion',
74             'UM' => 'Manja udaljena ostrva SAD',
75             'VC' => 'Sveti Vinsent i Grenadini',
76             'VG' => 'Britanska Djevičanska Ostrva',
77             'VI' => 'Američka Djevičanska Ostrva',
78              
79             }
80             },
81             );
82              
83             has 'calendar_months' => (
84             is => 'ro',
85             isa => HashRef,
86             init_arg => undef,
87             default => sub { {
88             'gregorian' => {
89             'stand-alone' => {
90             abbreviated => {
91             nonleap => [
92             'jan',
93             'feb',
94             'mart',
95             'apr',
96             'maj',
97             'jun',
98             'jul',
99             'avg',
100             'sept',
101             'okt',
102             'nov',
103             'dec'
104             ],
105             leap => [
106            
107             ],
108             },
109             },
110             },
111             } },
112             );
113              
114             has 'calendar_days' => (
115             is => 'ro',
116             isa => HashRef,
117             init_arg => undef,
118             default => sub { {
119             'gregorian' => {
120             'format' => {
121             abbreviated => {
122             mon => 'pon',
123             tue => 'ut',
124             wed => 'sr',
125             thu => 'čet',
126             fri => 'pet',
127             sat => 'sub',
128             sun => 'ned'
129             },
130             wide => {
131             mon => 'ponedeljak',
132             tue => 'utorak',
133             wed => 'srijeda',
134             thu => 'četvrtak',
135             fri => 'petak',
136             sat => 'subota',
137             sun => 'nedjelja'
138             },
139             },
140             'stand-alone' => {
141             abbreviated => {
142             mon => 'pon',
143             tue => 'ut',
144             wed => 'sr',
145             thu => 'čet',
146             fri => 'pet',
147             sat => 'sub',
148             sun => 'ned'
149             },
150             wide => {
151             mon => 'ponedeljak',
152             tue => 'utorak',
153             wed => 'srijeda',
154             thu => 'četvrtak',
155             fri => 'petak',
156             sat => 'subota',
157             sun => 'nedjelja'
158             },
159             },
160             },
161             } },
162             );
163              
164             has 'day_period_data' => (
165             is => 'ro',
166             isa => CodeRef,
167             init_arg => undef,
168             default => sub { sub {
169             # Time in hhmm format
170             my ($self, $type, $time, $day_period_type) = @_;
171             $day_period_type //= 'default';
172             SWITCH:
173             for ($type) {
174             if ($_ eq 'generic') {
175             if($day_period_type eq 'default') {
176             return 'midnight' if $time == 0;
177             return 'noon' if $time == 1200;
178             return 'afternoon1' if $time >= 1200
179             && $time < 1800;
180             return 'evening1' if $time >= 1800
181             && $time < 2100;
182             return 'morning1' if $time >= 600
183             && $time < 1200;
184             return 'night1' if $time >= 2100;
185             return 'night1' if $time < 600;
186             }
187             if($day_period_type eq 'selection') {
188             return 'afternoon1' if $time >= 1200
189             && $time < 1800;
190             return 'evening1' if $time >= 1800
191             && $time < 2100;
192             return 'morning1' if $time >= 600
193             && $time < 1200;
194             return 'night1' if $time >= 2100;
195             return 'night1' if $time < 600;
196             }
197             last SWITCH;
198             }
199             if ($_ eq 'gregorian') {
200             if($day_period_type eq 'default') {
201             return 'midnight' if $time == 0;
202             return 'noon' if $time == 1200;
203             return 'afternoon1' if $time >= 1200
204             && $time < 1800;
205             return 'evening1' if $time >= 1800
206             && $time < 2100;
207             return 'morning1' if $time >= 600
208             && $time < 1200;
209             return 'night1' if $time >= 2100;
210             return 'night1' if $time < 600;
211             }
212             if($day_period_type eq 'selection') {
213             return 'afternoon1' if $time >= 1200
214             && $time < 1800;
215             return 'evening1' if $time >= 1800
216             && $time < 2100;
217             return 'morning1' if $time >= 600
218             && $time < 1200;
219             return 'night1' if $time >= 2100;
220             return 'night1' if $time < 600;
221             }
222             last SWITCH;
223             }
224             }
225             } },
226             );
227              
228             around day_period_data => sub {
229             my ($orig, $self) = @_;
230             return $self->$orig;
231             };
232              
233             has 'day_periods' => (
234             is => 'ro',
235             isa => HashRef,
236             init_arg => undef,
237             default => sub { {
238             'gregorian' => {
239             'format' => {
240             'abbreviated' => {
241             'afternoon1' => q{po pod.},
242             'am' => q{prije podne},
243             'evening1' => q{veče},
244             'midnight' => q{ponoć},
245             'morning1' => q{jutro},
246             'night1' => q{noću},
247             'noon' => q{podne},
248             'pm' => q{po podne},
249             },
250             'narrow' => {
251             'afternoon1' => q{po pod.},
252             'evening1' => q{veče},
253             'midnight' => q{ponoć},
254             'morning1' => q{jutro},
255             'night1' => q{noć},
256             'noon' => q{podne},
257             },
258             'wide' => {
259             'am' => q{prije podne},
260             'pm' => q{po podne},
261             },
262             },
263             'stand-alone' => {
264             'abbreviated' => {
265             'am' => q{prije podne},
266             'pm' => q{po podne},
267             },
268             'narrow' => {
269             'am' => q{a},
270             'pm' => q{p},
271             },
272             'wide' => {
273             'am' => q{prije podne},
274             'pm' => q{po podne},
275             },
276             },
277             },
278             } },
279             );
280              
281             has 'eras' => (
282             is => 'ro',
283             isa => HashRef,
284             init_arg => undef,
285             default => sub { {
286             'generic' => {
287             },
288             'gregorian' => {
289             wide => {
290             '0' => 'prije nove ere'
291             },
292             },
293             } },
294             );
295              
296             has 'date_formats' => (
297             is => 'ro',
298             isa => HashRef,
299             init_arg => undef,
300             default => sub { {
301             'generic' => {
302             },
303             'gregorian' => {
304             },
305             } },
306             );
307              
308             has 'time_formats' => (
309             is => 'ro',
310             isa => HashRef,
311             init_arg => undef,
312             default => sub { {
313             'generic' => {
314             },
315             'gregorian' => {
316             },
317             } },
318             );
319              
320             has 'datetime_formats' => (
321             is => 'ro',
322             isa => HashRef,
323             init_arg => undef,
324             default => sub { {
325             'generic' => {
326             },
327             'gregorian' => {
328             },
329             } },
330             );
331              
332             has 'datetime_formats_available_formats' => (
333             is => 'ro',
334             isa => HashRef,
335             init_arg => undef,
336             default => sub { {
337             'gregorian' => {
338             MMMMW => q{W. 'sjedmica' 'u' MMM},
339             yw => q{w. 'sjedmica' 'u' Y.},
340             },
341             } },
342             );
343              
344             has 'datetime_formats_append_item' => (
345             is => 'ro',
346             isa => HashRef,
347             init_arg => undef,
348             default => sub { {
349             } },
350             );
351              
352             has 'datetime_formats_interval' => (
353             is => 'ro',
354             isa => HashRef,
355             init_arg => undef,
356             default => sub { {
357             'generic' => {
358             MMMEd => {
359             M => q{E, d. MMM – E, d. MMM},
360             d => q{E, d. MMM – E, d. MMM},
361             },
362             yMd => {
363             M => q{d.M.y. – d.M.y. GGGGG},
364             },
365             },
366             'gregorian' => {
367             MEd => {
368             M => q{E, MM-dd – E, MM-dd},
369             d => q{E, MM-dd – E, MM-dd},
370             },
371             Md => {
372             M => q{MM-dd – MM-dd},
373             d => q{MM-dd – MM-dd},
374             },
375             yM => {
376             M => q{y-MM – y-MM},
377             y => q{y-MM – y-MM},
378             },
379             yMEd => {
380             M => q{E, y-MM-dd – E, y-MM-dd},
381             d => q{E, y-MM-dd – E, y-MM-dd},
382             y => q{E, y-MM-dd – E, y-MM-dd},
383             },
384             yMd => {
385             M => q{y-MM-dd – y-MM-dd},
386             d => q{y-MM-dd – y-MM-dd},
387             y => q{y-MM-dd – y-MM-dd},
388             },
389             },
390             } },
391             );
392              
393             no Moo;
394 1     1   1428  
  1         2  
  1         6  
395             1;
396              
397             # vim: tabstop=4