File Coverage

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