File Coverage

blib/lib/Locale/CLDR/Locales/Hr/Any/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 NAME
4              
5             Locale::CLDR::Locales::Hr::Any::Ba - Package for language Croatian
6              
7             =cut
8              
9             package Locale::CLDR::Locales::Hr::Any::Ba;
10             # This file auto generated from Data\common\main\hr_BA.xml
11             # on Fri 13 Oct 9:20:01 am GMT
12              
13 1     1   1078 use strict;
  1         2  
  1         27  
14 1     1   5 use warnings;
  1         2  
  1         24  
15 1     1   5 use version;
  1         7  
  1         7  
16              
17             our $VERSION = version->declare('v0.34.2');
18              
19 1     1   92 use v5.10.1;
  1         3  
20 1     1   4 use mro 'c3';
  1         2  
  1         7  
21 1     1   21 use utf8;
  1         2  
  1         6  
22 1     1   28 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         1  
  1         12  
23 1     1   118 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         8  
24 1     1   1004 use Moo;
  1         1  
  1         6  
25              
26             extends('Locale::CLDR::Locales::Hr::Any');
27             has 'currencies' => (
28             is => 'ro',
29             isa => HashRef,
30             init_arg => undef,
31             default => sub { {
32             'BAM' => {
33             symbol => 'KM',
34             },
35             } },
36             );
37              
38              
39             has 'calendar_days' => (
40             is => 'ro',
41             isa => HashRef,
42             init_arg => undef,
43             default => sub { {
44             'gregorian' => {
45             'stand-alone' => {
46             narrow => {
47             mon => 'P',
48             tue => 'U',
49             wed => 'S',
50             thu => 'Č',
51             fri => 'P',
52             sat => 'S',
53             sun => 'N'
54             },
55             },
56             },
57             } },
58             );
59              
60             has 'calendar_quarters' => (
61             is => 'ro',
62             isa => HashRef,
63             init_arg => undef,
64             default => sub { {
65             'gregorian' => {
66             'format' => {
67             abbreviated => {0 => '1. kv.',
68             1 => '2. kv.',
69             2 => '3. kv.',
70             3 => '4. kv.'
71             },
72             },
73             },
74             } },
75             );
76              
77             has 'day_period_data' => (
78             is => 'ro',
79             isa => CodeRef,
80             init_arg => undef,
81             default => sub { sub {
82             # Time in hhmm format
83             my ($self, $type, $time, $day_period_type) = @_;
84             $day_period_type //= 'default';
85             SWITCH:
86             for ($type) {
87             if ($_ eq 'gregorian') {
88             if($day_period_type eq 'default') {
89             return 'midnight' if $time == 0;
90             return 'noon' if $time == 1200;
91             return 'afternoon1' if $time >= 1200
92             && $time < 1800;
93             return 'evening1' if $time >= 1800
94             && $time < 2100;
95             return 'morning1' if $time >= 400
96             && $time < 1200;
97             return 'night1' if $time >= 2100;
98             return 'night1' if $time < 400;
99             }
100             if($day_period_type eq 'selection') {
101             return 'afternoon1' if $time >= 1200
102             && $time < 1800;
103             return 'evening1' if $time >= 1800
104             && $time < 2100;
105             return 'morning1' if $time >= 400
106             && $time < 1200;
107             return 'night1' if $time >= 2100;
108             return 'night1' if $time < 400;
109             }
110             last SWITCH;
111             }
112             }
113             } },
114             );
115              
116             around day_period_data => sub {
117             my ($orig, $self) = @_;
118             return $self->$orig;
119             };
120              
121             has 'eras' => (
122             is => 'ro',
123             isa => HashRef,
124             init_arg => undef,
125             default => sub { {
126             'gregorian' => {
127             },
128             } },
129             );
130              
131             has 'date_formats' => (
132             is => 'ro',
133             isa => HashRef,
134             init_arg => undef,
135             default => sub { {
136             'gregorian' => {
137             'short' => q{d. M. yy.},
138             },
139             } },
140             );
141              
142             has 'time_formats' => (
143             is => 'ro',
144             isa => HashRef,
145             init_arg => undef,
146             default => sub { {
147             'gregorian' => {
148             },
149             } },
150             );
151              
152             has 'datetime_formats' => (
153             is => 'ro',
154             isa => HashRef,
155             init_arg => undef,
156             default => sub { {
157             'gregorian' => {
158             },
159             } },
160             );
161              
162             has 'datetime_formats_available_formats' => (
163             is => 'ro',
164             isa => HashRef,
165             init_arg => undef,
166             default => sub { {
167             } },
168             );
169              
170             has 'datetime_formats_append_item' => (
171             is => 'ro',
172             isa => HashRef,
173             init_arg => undef,
174             default => sub { {
175             } },
176             );
177              
178             has 'datetime_formats_interval' => (
179             is => 'ro',
180             isa => HashRef,
181             init_arg => undef,
182             default => sub { {
183             } },
184             );
185              
186 1     1   957 no Moo;
  1         1  
  1         4  
187              
188             1;
189              
190             # vim: tabstop=4