Class: Time

Inherits:
Object show all
Defined in:
lib/vanity/backport.rb

Instance Method Summary collapse

Instance Method Details

#to_dateObject

Backported from Ruby 1.9.



4
5
6
7
# File 'lib/vanity/backport.rb', line 4

def to_date
  jd = Date.__send__(:civil_to_jd, year, mon, mday, Date::ITALY)
  Date.new!(Date.__send__(:jd_to_ajd, jd, 0, 0), 0, Date::ITALY)
end