File Coverage

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