File Coverage

blib/lib/Locale/CLDR/Locales/Sr/Latn/Xk.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::Sr::Latn::Xk - Package for language Serbian
6              
7             =cut
8              
9             package Locale::CLDR::Locales::Sr::Latn::Xk;
10             # This file auto generated from Data\common\main\sr_Latn_XK.xml
11             # on Fri 17 Jan 12:03:31 pm GMT
12              
13 1     1   1500 use strict;
  1         3  
  1         46  
14 1     1   5 use warnings;
  1         3  
  1         52  
15 1     1   7 use version;
  1         3  
  1         7  
16              
17             our $VERSION = version->declare('v0.46.0');
18              
19 1     1   151 use v5.12.0;
  1         5  
20 1     1   5 use mro 'c3';
  1         3  
  1         6  
21 1     1   30 use utf8;
  1         2  
  1         7  
22 1     1   48 use feature 'unicode_strings';
  1         2  
  1         128  
23 1     1   6 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         8  
24 1     1   2954 use Moo;
  1         3  
  1         8  
25              
26             extends('Locale::CLDR::Locales::Sr::Latn');
27             has 'display_name_language' => (
28             is => 'ro',
29             isa => CodeRef,
30             init_arg => undef,
31             default => sub {
32             sub {
33             my %languages = (
34             'bm' => 'bamanankan',
35             'bn' => 'bangla',
36             'ff' => 'fulah',
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             'xh' => 'isikosa',
45             'zgh' => 'standardni marokanski tamašek',
46             'zu' => 'isizulu',
47              
48             );
49             if (@_) {
50             return $languages{$_[0]};
51             }
52             return \%languages;
53             }
54             },
55             );
56              
57             has 'display_name_region' => (
58             is => 'ro',
59             isa => HashRef[Str],
60             init_arg => undef,
61             default => sub {
62             {
63             'CG' => 'Kongo',
64             'CV' => 'Kabo Verde',
65             'CZ' => 'Češka Republika',
66             'HK' => 'SAR Hongkong',
67             'KN' => 'Sveti Kits i Nevis',
68             'MO' => 'SAR Makao',
69             'PM' => 'Sveti Pjer i Mikelon',
70             'RE' => 'Reunion',
71             'UM' => 'Manja udaljena ostrva SAD',
72             'VC' => 'Sveti Vinsent i Grenadini',
73              
74             }
75             },
76             );
77              
78             has 'calendar_months' => (
79             is => 'ro',
80             isa => HashRef,
81             init_arg => undef,
82             default => sub { {
83             'gregorian' => {
84             'format' => {
85             abbreviated => {
86             nonleap => [
87             'jan',
88             'feb',
89             'mart',
90             'apr',
91             'maj',
92             'jun',
93             'jul',
94             'avg',
95             'sept',
96             'okt',
97             'nov',
98             'dec'
99             ],
100             leap => [
101            
102             ],
103             },
104             },
105             },
106             } },
107             );
108              
109             has 'day_period_data' => (
110             is => 'ro',
111             isa => CodeRef,
112             init_arg => undef,
113             default => sub { sub {
114             # Time in hhmm format
115             my ($self, $type, $time, $day_period_type) = @_;
116             $day_period_type //= 'default';
117             SWITCH:
118             for ($type) {
119             if ($_ eq 'generic') {
120             if($day_period_type eq 'default') {
121             return 'midnight' if $time == 0;
122             return 'noon' if $time == 1200;
123             return 'afternoon1' if $time >= 1200
124             && $time < 1800;
125             return 'evening1' if $time >= 1800
126             && $time < 2100;
127             return 'morning1' if $time >= 600
128             && $time < 1200;
129             return 'night1' if $time >= 2100;
130             return 'night1' if $time < 600;
131             }
132             if($day_period_type eq 'selection') {
133             return 'afternoon1' if $time >= 1200
134             && $time < 1800;
135             return 'evening1' if $time >= 1800
136             && $time < 2100;
137             return 'morning1' if $time >= 600
138             && $time < 1200;
139             return 'night1' if $time >= 2100;
140             return 'night1' if $time < 600;
141             }
142             last SWITCH;
143             }
144             if ($_ eq 'gregorian') {
145             if($day_period_type eq 'default') {
146             return 'midnight' if $time == 0;
147             return 'noon' if $time == 1200;
148             return 'afternoon1' if $time >= 1200
149             && $time < 1800;
150             return 'evening1' if $time >= 1800
151             && $time < 2100;
152             return 'morning1' if $time >= 600
153             && $time < 1200;
154             return 'night1' if $time >= 2100;
155             return 'night1' if $time < 600;
156             }
157             if($day_period_type eq 'selection') {
158             return 'afternoon1' if $time >= 1200
159             && $time < 1800;
160             return 'evening1' if $time >= 1800
161             && $time < 2100;
162             return 'morning1' if $time >= 600
163             && $time < 1200;
164             return 'night1' if $time >= 2100;
165             return 'night1' if $time < 600;
166             }
167             last SWITCH;
168             }
169             }
170             } },
171             );
172              
173             around day_period_data => sub {
174             my ($orig, $self) = @_;
175             return $self->$orig;
176             };
177              
178             has 'day_periods' => (
179             is => 'ro',
180             isa => HashRef,
181             init_arg => undef,
182             default => sub { {
183             'gregorian' => {
184             'format' => {
185             'abbreviated' => {
186             'afternoon1' => q{po pod.},
187             'evening1' => q{uveče},
188             'midnight' => q{ponoć},
189             'morning1' => q{jutro},
190             'night1' => q{noću},
191             'noon' => q{podne},
192             },
193             'narrow' => {
194             'afternoon1' => q{po pod.},
195             'evening1' => q{veče},
196             'midnight' => q{ponoć},
197             'morning1' => q{jutro},
198             'night1' => q{noć},
199             'noon' => q{podne},
200             },
201             },
202             'stand-alone' => {
203             'narrow' => {
204             'am' => q{a},
205             'pm' => q{p},
206             },
207             },
208             },
209             } },
210             );
211              
212             has 'eras' => (
213             is => 'ro',
214             isa => HashRef,
215             init_arg => undef,
216             default => sub { {
217             'generic' => {
218             },
219             'gregorian' => {
220             },
221             } },
222             );
223              
224             has 'date_formats' => (
225             is => 'ro',
226             isa => HashRef,
227             init_arg => undef,
228             default => sub { {
229             'generic' => {
230             },
231             'gregorian' => {
232             },
233             } },
234             );
235              
236             has 'time_formats' => (
237             is => 'ro',
238             isa => HashRef,
239             init_arg => undef,
240             default => sub { {
241             'generic' => {
242             },
243             'gregorian' => {
244             },
245             } },
246             );
247              
248             has 'datetime_formats' => (
249             is => 'ro',
250             isa => HashRef,
251             init_arg => undef,
252             default => sub { {
253             'generic' => {
254             },
255             'gregorian' => {
256             },
257             } },
258             );
259              
260             has 'datetime_formats_available_formats' => (
261             is => 'ro',
262             isa => HashRef,
263             init_arg => undef,
264             default => sub { {
265             } },
266             );
267              
268             has 'datetime_formats_append_item' => (
269             is => 'ro',
270             isa => HashRef,
271             init_arg => undef,
272             default => sub { {
273             } },
274             );
275              
276             has 'datetime_formats_interval' => (
277             is => 'ro',
278             isa => HashRef,
279             init_arg => undef,
280             default => sub { {
281             'generic' => {
282             MMMEd => {
283             M => q{E, d. MMM – E, d. MMM},
284             d => q{E, d – E, d. MMM},
285             },
286             },
287             } },
288             );
289              
290 1     1   2290 no Moo;
  1         3  
  1         7  
291              
292             1;
293              
294             # vim: tabstop=4