lib/hijri/gregorian.rb in hijri-0.5.0 vs lib/hijri/gregorian.rb in hijri-0.6.0
- old
+ new
@@ -1,7 +1,7 @@
class Date
- def to_hijri
- Hijri::Date.new *Hijri::Converter.greo_to_hijri(self)
+ def to_hijri(adjust=0)
+ Hijri::Date.new(*Hijri::Converter.greo_to_hijri(self + adjust))
end
def last_day_of_gregorian_month(month)
# Compute the last date of the month for the Gregorian calendar.
if month == 2