ethiopic_date 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/ethiopic_date/version.rb +1 -1
- data/lib/ethiopic_date.rb +14 -16
- metadata +1 -1
data/lib/ethiopic_date.rb
CHANGED
|
@@ -9,8 +9,6 @@ module EthiopicDate
|
|
|
9
9
|
public
|
|
10
10
|
Nmonths = 12
|
|
11
11
|
MonthDays = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
|
|
12
|
-
Ethiopic_month_names={:1=>"መስከረም",:2=>"ጥቅምት",:3=>"ህዳር",:4=>"ታህሳስ",5=>"ጥር",
|
|
13
|
-
:6=>"የካቲት",:7=>"መጋቢት",:8=>"ሚያዝያ",:9=>"ግንቦት",:10=>"ሰኔ",:11=>"ሐምሌ",:12=>"ነሃሴ",:13=>"ጳጉሜን"}
|
|
14
12
|
|
|
15
13
|
#Ethiopic: Julian date offset
|
|
16
14
|
JD_EPOCH_OFFSET_AMETE_MIHRET = 1723856 # ዓ/ም
|
|
@@ -67,7 +65,7 @@ module EthiopicDate
|
|
|
67
65
|
ethiopic_date[:month] =(n/30) + 1
|
|
68
66
|
ethiopic_date[:day] =(n.modulo(30)) + 1
|
|
69
67
|
|
|
70
|
-
return
|
|
68
|
+
return ethiopic_date_format(ethiopic_date)
|
|
71
69
|
end
|
|
72
70
|
|
|
73
71
|
|
|
@@ -81,19 +79,19 @@ module EthiopicDate
|
|
|
81
79
|
month=ethiopic_date[:month]
|
|
82
80
|
day=ethiopic_date[:day]
|
|
83
81
|
case month
|
|
84
|
-
when 1 then month_name="
|
|
85
|
-
when 2 then month_name="
|
|
86
|
-
when 3 then month_name="
|
|
87
|
-
when 4 then month_name="
|
|
88
|
-
when 5 then month_name="
|
|
89
|
-
when 6 then month_name="
|
|
90
|
-
when 7 then month_name="
|
|
91
|
-
when 8 then month_name="
|
|
92
|
-
when 9 then month_name="
|
|
93
|
-
when 10 then month_name="
|
|
94
|
-
when 11 then month_name="
|
|
95
|
-
when 12 then month_name="
|
|
96
|
-
when 13 then month_name="
|
|
82
|
+
when 1 then month_name="መስከረም "
|
|
83
|
+
when 2 then month_name="ጥቅምት "
|
|
84
|
+
when 3 then month_name="ህዳር "
|
|
85
|
+
when 4 then month_name="ታህሳስ "
|
|
86
|
+
when 5 then month_name="ጥር "
|
|
87
|
+
when 6 then month_name="የካቲት "
|
|
88
|
+
when 7 then month_name="መጋቢት "
|
|
89
|
+
when 8 then month_name="ሚያዝያ "
|
|
90
|
+
when 9 then month_name="ግንቦት "
|
|
91
|
+
when 10 then month_name="ሰኔ "
|
|
92
|
+
when 11 then month_name="ሐምሌ "
|
|
93
|
+
when 12 then month_name="ነሃሴ "
|
|
94
|
+
when 13 then month_name="ጳጉሜን "
|
|
97
95
|
end
|
|
98
96
|
return " #{month_name} #{day} ቀን #{year}ዓ/ም "
|
|
99
97
|
end
|