ethiopic_date 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module EthiopicDate
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
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 "#{Ethiopic_month_names[:ethiopic_date[:month]]} #{ethiopic_date[:day]} ቀን #{ethiopic_date[:year]}ዓ/ም "
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
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: ethiopic_date
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.8
5
+ version: 0.0.9
6
6
  platform: ruby
7
7
  authors:
8
8
  - G/yohannes Zenebe