Debian Codegraph @

lib/Date/Language/Swedish.pm

raw
1 ##
2 ## Swedish tables
3 ## Contributed by Matthew Musgrove <[email protected]>
4 ## Corrected by dempa
5 ##
6
7 package Date::Language::Swedish;
8
9 use strict;
10 use warnings;
11 use base 'Date::Language';
12 use Date::Language::English ();
13
14 our $VERSION = '2.35'; # VERSION: generated
15 # ABSTRACT: Swedish localization for Date::Format
16
17 our @MoY = qw(januari februari mars april maj juni juli augusti september oktober november december);
18 our @MoYs = map { substr($_,0,3) } @MoY;
19 our @DoW = map($_ . "dagen", qw(sön mån tis ons tors fre lör));
20 our @DoWs = map { substr($_,0,2) } @DoW;
21
22 # the ordinals are not typically used in modern times
23 our @Dsuf = ('a' x 2, 'e' x 29);
24
25 our @AMPM = @{Date::Language::English::AMPM};
26
27 our ( %MoY, %DoW );
28 Date::Language::_build_lookups();
29
30 # Formatting routines
31
32 sub format_a { $DoWs[$_[0]->[6]] }
33 sub format_A { $DoW[$_[0]->[6]] }
34 sub format_b { $MoYs[$_[0]->[4]] }
35 sub format_B { $MoY[$_[0]->[4]] }
36 sub format_h { $MoYs[$_[0]->[4]] }
37 sub format_p { $_[0]->[2] >= 12 ? $AMPM[1] : $AMPM[0] }
38 sub format_o { sprintf("%2de",$_[0]->[3]) }
39
40 1;
41
42 __END__
43
44 =pod
45
46 =encoding UTF-8
47
48 =head1 NAME
49
50 Date::Language::Swedish - Swedish localization for Date::Format
51
52 =head1 VERSION
53
54 version 2.35
55
56 =head1 AUTHOR
57
58 Graham <[email protected]>
59
60 =head1 COPYRIGHT AND LICENSE
61
62 This software is copyright (c) 2020 by Graham Barr.
63
64 This is free software; you can redistribute it and/or modify it under
65 the same terms as the Perl 5 programming language system itself.
66
67 =cut