Ethiopic/ti.pm untested

filter: Statementstmt 0.0% 0 / 85 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 12 MC/DCmcdc 0.0% 0 / 8 Subroutinesub 0.0% 0 / 14 Podpod 0.0% 0 / 9 totaltotal 0.0% 0 / 136 CC 5 SCAR 13.3
CC
5
Cov
0%
_daysep
6.0
am
6.0
pm
6.0
CRAP 3.8
1 package Date::Ethiopic::ti;
2 use base ( "Date::Ethiopic" );
3 use utf8;
4  
5 BEGIN
6 {
7 use strict;
8 use warnings;
9 use vars qw(
10 @Days
11 @Months
12 @ShortDays
13 @ShortMonths
14 );
15  
16 $VERSION = "0.16";
17  
18 #@OldDays =(
19 # "ሰንበት",
20 # "ሰኑይ",
21 # "ሠሉስ",
22 # "ረቡዕ",
23 # "ኃሙስ",
24 # "ዓርቢ",
25 # "ቀዳም"
26 #);
27 @Days =(
28 [ "ሰንበት", "Sennebet" ],
29 [ "ሰኑይ", "Senoi" ],
30 [ "ሰሉስ", "Sellus" ],
31 [ "ረቡዕ", "Rebu" ],
32 [ "ሓሙስ", "Hamus" ],
33 [ "ዓርቢ", "Arbi" ],
34 [ "ቀዳም", "Kidam" ]
35 );
36 @Months =(
37 [ "መስከረም", "Meskerem" ],
38 [ "ጥቅምቲ", "Tekemti" ],
39 [ "ሕዳር", "Hedar" ],
40 [ "ታሕሳስ", "Tahsas" ],
41 [ "ጥሪ", "Teri" ],
42 [ "ለካቲት", "Lekatit" ],
43 [ "መጋቢት", "Megabit" ],
44 [ "ሚያዝያ", "Miazia" ],
45 [ "ግንቦት", "Genbot" ],
46 [ "ሰነ", "Sene" ],
47 [ "ሓምለ", "Hamle" ],
48 [ "ነሓሰ", "Nehasse" ],
49 [ "ጳጉሜን", "Pagumen" ]
50 );
51 @ShortDays =(
52 [ "ሰንበ", "Snb" ],
53 [ "ሰኑይ", "Sno" ],
54 [ "ሰሉስ", "Sel" ],
55 [ "ረቡዕ", "Reb" ],
56 [ "ሓሙስ", "Ham" ],
57 [ "ዓርቢ", "Arb" ],
58 [ "ቀዳም", "Kid" ]
59 );
60 @ShortMonths =(
61 [ "መስከ", "Mes" ],
62 [ "ጥቅም", "Tek" ],
63 [ "ሕዳር", "Hed" ],
64 [ "ታሕሳ", "Tah" ],
65 [ "ጥሪ ", "Ter" ],
66 [ "ለካቲ", "Lek" ],
67 [ "መጋቢ", "Meg" ],
68 [ "ሚያዝ", "Mia" ],
69 [ "ግንቦ", "Gen" ],
70 [ "ሰነ ", "Sen" ],
71 [ "ሓምለ", "Ham" ],
72 [ "ነሓሰ", "Neh" ],
73 [ "ጳጉሜ", "Pag" ]
74 );
75 }
76  
77  
78 sub _daysep
79 {
80 ($_[0]->{_trans}) ? " Me'alti " : " መዓልቲ "; # ዕለት
81 }
82  
83  
84 sub am
85 {
86 ($_[0]->{_trans}) ? "Neguho se'ate" : "ንጉሆ ሰዓተ";
87 }
88  
89  
90 sub pm
91 {
92 ($_[0]->{_trans}) ? "dehir se'at" : "ድሕር ሰዓት";
93 }
94  
95  
96 sub name
97 {
98 ($_[0]->{_trans}) ? "Tigrinya" : "ትግርኛ";
99 }
100  
101  
102 sub day_name
103 {
104 my ( $self, $day ) = @_;
105  
106 $day ||= $self->_EthiopicToAbsolute;
107  
108 $day %= 7;
109  
110 $Days[$day][$self->{_trans}];
111 }
112  
113  
114 sub short_day_name
115 {
116 my ( $self, $day ) = @_;
117  
118 $day ||= $self->_EthiopicToAbsolute;
119  
120 $day %= 7;
121  
122 $ShortDays[$day][$self->{_trans}];
123 }
124  
125  
126 sub month_name
127 {
128 my ( $self, $month ) = @_;
129  
130 $month ||= $self->month;
131  
132 $month -= 1;
133  
134 $Months[$month][$self->{_trans}];
135 }
136  
137  
138 sub short_month_name
139 {
140 my ( $self, $month ) = @_;
141  
142 $month ||= $self->month;
143  
144 $month -= 1;
145  
146 $ShortMonths[$month][$self->{_trans}];
147 }
148  
149  
150  
151 #########################################################
152 # Do not change this, Do not put anything below this.
153 # File must return "true" value at termination
154 1;
155 ##########################################################
156  
157 __END__