File Coverage

blib/lib/Locale/CLDR/Locales/Sv/Any/Fi.pm
Criterion Covered Total %
statement 32 32 100.0
branch n/a
condition n/a
subroutine 11 11 100.0
pod n/a
total 43 43 100.0


line stmt bran cond sub pod time code
1             =encoding utf8
2              
3             =head1 NAME
4              
5             Locale::CLDR::Locales::Sv::Any::Fi - Package for language Swedish
6              
7             =cut
8              
9             package Locale::CLDR::Locales::Sv::Any::Fi;
10             # This file auto generated from Data\common\main\sv_FI.xml
11             # on Fri 13 Oct 9:42:48 am GMT
12              
13 1     1   862 use strict;
  1         2  
  1         25  
14 1     1   4 use warnings;
  1         2  
  1         20  
15 1     1   3 use version;
  1         2  
  1         5  
16              
17             our $VERSION = version->declare('v0.34.2');
18              
19 1     1   81 use v5.10.1;
  1         3  
20 1     1   4 use mro 'c3';
  1         1  
  1         4  
21 1     1   19 use utf8;
  1         2  
  1         4  
22 1     1   48 use if $^V ge v5.12.0, feature => 'unicode_strings';
  1         2  
  1         9  
23 1     1   79 use Types::Standard qw( Str Int HashRef ArrayRef CodeRef RegexpRef );
  1         2  
  1         6  
24 1     1   862 use Moo;
  1         2  
  1         4  
25              
26             extends('Locale::CLDR::Locales::Sv::Any');
27             has 'display_name_language' => (
28             is => 'ro',
29             isa => CodeRef,
30             init_arg => undef,
31             default => sub {
32             sub {
33             my %languages = (
34             'ky' => 'kirgiziska',
35              
36             );
37             if (@_) {
38             return $languages{$_[0]};
39             }
40             return \%languages;
41             }
42             },
43             );
44              
45             has 'display_name_script' => (
46             is => 'ro',
47             isa => CodeRef,
48             init_arg => undef,
49             default => sub {
50             sub {
51             my %scripts = (
52             'Arab@alt=variant' => 'persisk-arabiska',
53              
54             );
55             if ( @_ ) {
56             return $scripts{$_[0]};
57             }
58             return \%scripts;
59             }
60             }
61             );
62              
63             has 'display_name_key' => (
64             is => 'ro',
65             isa => HashRef[Str],
66             init_arg => undef,
67             default => sub {
68             {
69             'timezone' => 'tidszon',
70              
71             }
72             },
73             );
74              
75             has 'display_name_type' => (
76             is => 'ro',
77             isa => HashRef[HashRef[Str]],
78             init_arg => undef,
79             default => sub {
80             {
81             'collation' => {
82             'big5han' => q{kinesiska i big5-sorteringsordning},
83             'gb2312han' => q{kinesiska i gb2312-sorteringsordning},
84             'pinyin' => q{kinesiska i pinyin-sorteringsordning},
85             'stroke' => q{kinesiska i strecksorteringsordning},
86             },
87              
88             }
89             },
90             );
91              
92             has 'characters' => (
93             is => 'ro',
94             isa => HashRef,
95             init_arg => undef,
96             default => $^V ge v5.18.0
97             ? eval <<'EOT'
98             sub {
99             no warnings 'experimental::regex_sets';
100             return {
101             main => qr{[a à b c d e é f g h i j k l m n o p q r s t u v x y z å ä ö]},
102             };
103             },
104             EOT
105             : sub {
106             return {};
107             },
108 1     1   97 );
  1         3  
  1         77  
109              
110              
111             has 'units' => (
112             is => 'ro',
113             isa => HashRef[HashRef[HashRef[Str]]],
114             init_arg => undef,
115             default => sub { {
116             'narrow' => {
117             'kilometer-per-hour' => {
118             'one' => q({0} km/h),
119             'other' => q({0} km/h),
120             },
121             },
122             'short' => {
123             'celsius' => {
124             'name' => q(grader Celsius),
125             },
126             },
127             } }
128             );
129              
130             has 'calendar_quarters' => (
131             is => 'ro',
132             isa => HashRef,
133             init_arg => undef,
134             default => sub { {
135             'gregorian' => {
136             'format' => {
137             abbreviated => {0 => 'Q1',
138             1 => 'Q2',
139             2 => 'Q3',
140             3 => 'Q4'
141             },
142             },
143             'stand-alone' => {
144             abbreviated => {0 => 'Q1',
145             1 => 'Q2',
146             2 => 'Q3',
147             3 => 'Q4'
148             },
149             },
150             },
151             } },
152             );
153              
154             has 'day_period_data' => (
155             is => 'ro',
156             isa => CodeRef,
157             init_arg => undef,
158             default => sub { sub {
159             # Time in hhmm format
160             my ($self, $type, $time, $day_period_type) = @_;
161             $day_period_type //= 'default';
162             SWITCH:
163             for ($type) {
164             if ($_ eq 'gregorian') {
165             if($day_period_type eq 'default') {
166             return 'midnight' if $time == 0;
167             return 'afternoon1' if $time >= 1200
168             && $time < 1800;
169             return 'evening1' if $time >= 1800
170             && $time < 2400;
171             return 'morning1' if $time >= 500
172             && $time < 1000;
173             return 'morning2' if $time >= 1000
174             && $time < 1200;
175             return 'night1' if $time >= 0
176             && $time < 500;
177             }
178             if($day_period_type eq 'selection') {
179             return 'afternoon1' if $time >= 1200
180             && $time < 1800;
181             return 'evening1' if $time >= 1800
182             && $time < 2400;
183             return 'morning1' if $time >= 500
184             && $time < 1000;
185             return 'morning2' if $time >= 1000
186             && $time < 1200;
187             return 'night1' if $time >= 0
188             && $time < 500;
189             }
190             last SWITCH;
191             }
192             }
193             } },
194             );
195              
196             around day_period_data => sub {
197             my ($orig, $self) = @_;
198             return $self->$orig;
199             };
200              
201             has 'eras' => (
202             is => 'ro',
203             isa => HashRef,
204             init_arg => undef,
205             default => sub { {
206             'gregorian' => {
207             },
208             } },
209             );
210              
211             has 'date_formats' => (
212             is => 'ro',
213             isa => HashRef,
214             init_arg => undef,
215             default => sub { {
216             'gregorian' => {
217             'short' => q{dd-MM-y},
218             },
219             } },
220             );
221              
222             has 'time_formats' => (
223             is => 'ro',
224             isa => HashRef,
225             init_arg => undef,
226             default => sub { {
227             'gregorian' => {
228             },
229             } },
230             );
231              
232             has 'datetime_formats' => (
233             is => 'ro',
234             isa => HashRef,
235             init_arg => undef,
236             default => sub { {
237             'gregorian' => {
238             },
239             } },
240             );
241              
242             has 'datetime_formats_available_formats' => (
243             is => 'ro',
244             isa => HashRef,
245             init_arg => undef,
246             default => sub { {
247             } },
248             );
249              
250             has 'datetime_formats_append_item' => (
251             is => 'ro',
252             isa => HashRef,
253             init_arg => undef,
254             default => sub { {
255             } },
256             );
257              
258             has 'datetime_formats_interval' => (
259             is => 'ro',
260             isa => HashRef,
261             init_arg => undef,
262             default => sub { {
263             } },
264             );
265              
266 1     1   1205 no Moo;
  1         2  
  1         4  
267              
268             1;
269              
270             # vim: tabstop=4