Ethiopic/gez.pm untested

filter: Statementstmt 0.0% 0 / 86 Branchbran 0.0% 0 / 10 Conditioncond 0.0% 0 / 12 MC/DCmcdc 0.0% 0 / 8 Subroutinesub 0.0% 0 / 15 Podpod 0.0% 0 / 10 totaltotal 0.0% 0 / 141 CC 6 SCAR 13.9
CC
6
Cov
0%
_daysep
6.0
_sep
6.0
am
6.0
CRAP 4.0
1 package Date::Ethiopic::gez;
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 @Days =(
19 [ "አኀዱ", "Ahadu" ],
20 [ "ሰኑይ", "Senuy" ],
21 [ "ሠሉስ", "Sellus" ],
22 [ "ራብዕ", "Rabi" ],
23 [ "ኃምስ", "Hamis" ],
24 [ "ዓርበ", "Arbe" ],
25 [ "ቀዳም", "Kedam" ]
26 );
27 @Months =(
28 [ "ከረመ", "Kereme" ],
29 [ "ጠቀመ", "Tekeme" ],
30 [ "ኀደረ", "Hedere" ],
31 [ "ኀሠሠ", "Hesese" ],
32 [ "ጠሐረ", "Tehere" ], # ጥሕረ
33 [ "ከተተ", "Ketete" ],
34 [ "መገበ", "Megebe" ],
35 [ "አኀዘ", "Aheze" ],
36 [ "ግንባት", "Genbat" ],
37 [ "ሠንየ", "Senye" ],
38 [ "ሐመለ", "Hemele" ],
39 [ "ነሐሰ", "Nehese" ],
40 [ "ጳጕሜን", "Pagumen" ]
41 );
42 @ShortDays =(
43 [ "አኀዱ", "Aha" ], # እኁድ
44 [ "ሰኑይ", "Sen" ], # ዕብራ
45 [ "ሠሉስ", "Sel" ], # ምንትው
46 [ "ራብዕ", "Rab" ], # ረቡዕ
47 [ "ኃምስ", "Ham" ],
48 [ "ዓርበ", "Arb" ],
49 [ "ቀዳም", "Ked" ] # ቀዳሚት
50 );
51 @ShortMonths =(
52 [ "ከረመ", "Ker" ],
53 [ "ጠቀመ", "Tek" ],
54 [ "ኀደረ", "Hed" ],
55 [ "ኀሠሠ", "Hes" ],
56 [ "ጠሐረ", "Teh" ],
57 [ "ከተተ", "Ket" ],
58 [ "መገበ", "Meg" ],
59 [ "አኀዘ", "Ahe" ],
60 [ "ግንባ", "Gen" ],
61 [ "ሠንየ", "Sen" ],
62 [ "ሐመለ", "Hem" ],
63 [ "ነሐሰ", "Neh" ],
64 [ "ጳጕሜ", "Pag" ]
65 );
66 }
67  
68  
69 sub _daysep
70 {
71 ($_[0]->{_trans}) ? " Ken " : " ቀን ";
72 }
73  
74  
75 sub _sep
76 {
77 ($_[0]->{_trans}) ? ", " : "፥ ";
78 }
79  
80  
81 sub am
82 {
83 # this is tigrinya
84 #
85 ($_[0]->{_trans}) ? "Neguho se'ate" : "ንጉሆ ሰዓተ";
86 }
87  
88  
89 sub pm
90 {
91 # this is tigrinya
92 #
93 ($_[0]->{_trans}) ? "dehir se'at" : "ድሕር ሰዓት";
94 }
95  
96  
97 sub name
98 {
99 ($_[0]->{_trans}) ? "Ge'ez" : "ግዕዝ";
100 }
101  
102  
103 sub day_name
104 {
105 my ( $self, $day ) = @_;
106  
107 $day ||= $self->_EthiopicToAbsolute;
108  
109 $day %= 7;
110  
111 $Days[$day][$self->{_trans}];
112 }
113  
114  
115 sub short_day_name
116 {
117 my ( $self, $day ) = @_;
118  
119 $day ||= $self->_EthiopicToAbsolute;
120  
121 $day %= 7;
122  
123 $ShortDays[$day][$self->{_trans}];
124 }
125  
126  
127 sub month_name
128 {
129 my ( $self, $month ) = @_;
130  
131 $month ||= $self->month;
132  
133 $month -= 1;
134  
135 $Months[$month][$self->{_trans}];
136 }
137  
138  
139 sub short_month_name
140 {
141 my ( $self, $month ) = @_;
142  
143 $month ||= $self->month;
144  
145 $month -= 1;
146  
147 $ShortMonths[$month][$self->{_trans}];
148 }
149  
150  
151  
152 #########################################################
153 # Do not change this, Do not put anything below this.
154 # File must return "true" value at termination
155 1;
156 ##########################################################
157  
158 __END__