Date/Language/Finnish.pm

filter: Statementstmt 90.6% 29 / 32 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 9 / 12 Podpod 0.0% 0 / 7 totaltotal 71.7% 38 / 53 CC 2 SCAR 6.5
CC
2
Cov
85%
format_p
6.0
format_h
2.0
format_o
2.0
CRAP 1.9
« Date/Language/Gedeo.pm ↑ Summary Date/Language/Greek.pm »
1 ##
2 ## Finnish tables
3 ## Contributed by Matthew Musgrove <muskrat@mindless.com>
4 ## Corrected by roke
5 ##
6  
7 package Date::Language::Finnish;
8  
9 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 3 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 3 ▶use base 'Date::Language';
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 3 our $VERSION = '2.35'; # VERSION: generated
16 # ABSTRACT: Finnish localization for Date::Format
17 3 ▶use Date::Language ();
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 # In Finnish, the names of the months and days are only capitalized at the beginning of sentences.
20 3 our @MoY = map($_ . "kuu", qw(tammi helmi maalis huhti touko kesä heinä elo syys loka marras joulu));
21 3 our @DoW = qw(sunnuntai maanantai tiistai keskiviikko torstai perjantai lauantai);
22  
23 # it is not customary to use abbreviated names of months or days
24 # per Graham's suggestion:
25 3 our @MoYs = @MoY;
26 3 our @DoWs = @DoW;
27  
28 # the short form of ordinals
29 3 our @Dsuf = ('.') x 31;
30  
31 # doesn't look like this is normally used...
32 3 our @AMPM = qw(ap ip);
33  
34 3 our ( %MoY, %DoW );
35 3 Date::Language::_build_lookups();
36  
37 # Formatting routines
38  
39 3 ▶sub format_a { $DoWs[$_[0]->[6]] }
Subroutine format_a: called CC=1 SCAR=0.0
Pod undocumented
40 2 ▶sub format_A { $DoW[$_[0]->[6]] }
Subroutine format_A: called CC=1 SCAR=0.0
Pod undocumented
41 3 ▶sub format_b { $MoYs[$_[0]->[4]] }
Subroutine format_b: called CC=1 SCAR=0.0
Pod undocumented
42 2 ▶sub format_B { $MoY[$_[0]->[4]] }
Subroutine format_B: called CC=1 SCAR=0.0
Pod undocumented
43 0 ▶sub format_h { $MoYs[$_[0]->[4]] }
Subroutine format_h: not called CC=1 SCAR=6.9
Pod undocumented
44 0 ▶sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
Subroutine format_p: not called CC=2 SCAR=17.9
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
$_[0][2] >= 12 ? : 0 0 0
45 0 ▶sub format_o { sprintf("%2de",$_[0]->[3]) }
Subroutine format_o: not called CC=1 SCAR=6.9
Pod undocumented
46  
47 3 1;
48  
49 __END__
« Date/Language/Gedeo.pm ↑ Summary Date/Language/Greek.pm »