File Coverage

blib/lib/Date/Language/Finnish.pm
Criterion Covered Total %
statement 19 22 86.3
branch 0 2 0.0
condition n/a
subroutine 9 12 75.0
pod 0 7 0.0
total 28 43 65.1


line stmt bran cond sub pod time code
1             ##
2             ## Finnish tables
3             ## Contributed by Matthew Musgrove
4             ## Corrected by roke
5             ##
6              
7             package Date::Language::Finnish;
8              
9 2     2   14 use strict;
  2         4  
  2         74  
10 2     2   7 use warnings;
  2         2  
  2         84  
11 2     2   8 use utf8;
  2         3  
  2         10  
12              
13 2     2   45 use base 'Date::Language';
  2         3  
  2         209  
14              
15             our $VERSION = '2.34'; # VERSION: generated
16             # ABSTRACT: Finnish localization for Date::Format
17 2     2   9 use Date::Language ();
  2         3  
  2         566  
18              
19             # In Finnish, the names of the months and days are only capitalized at the beginning of sentences.
20             our @MoY = map($_ . "kuu", qw(tammi helmi maalis huhti touko kesä heinä elo syys loka marras joulu));
21             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             our @MoYs = @MoY;
26             our @DoWs = @DoW;
27              
28             # the short form of ordinals
29             our @Dsuf = ('.') x 31;
30              
31             # doesn't look like this is normally used...
32             our @AMPM = qw(ap ip);
33              
34             our ( %MoY, %DoW );
35             Date::Language::_build_lookups();
36              
37             # Formatting routines
38              
39 2     2 0 8 sub format_a { $DoWs[$_[0]->[6]] }
40 1     1 0 4 sub format_A { $DoW[$_[0]->[6]] }
41 2     2 0 7 sub format_b { $MoYs[$_[0]->[4]] }
42 1     1 0 5 sub format_B { $MoY[$_[0]->[4]] }
43 0     0 0   sub format_h { $MoYs[$_[0]->[4]] }
44 0 0   0 0   sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
45 0     0 0   sub format_o { sprintf("%2de",$_[0]->[3]) }
46              
47             1;
48              
49             __END__