Class: Time
- Inherits:
-
Object
- Object
- Time
- Defined in:
- lib/core_ext/time.rb
Overview
Time#to_date defined in date library extension
Instance Method Summary collapse
-
#to_gregorian_date ⇒ Object
Returns a Date object denoting the chronological Julian day corresponding to the Time value’s Gregorian date.
-
#to_julian_date ⇒ Object
Returns a Date object denoting the chronological Julian day corresponding to the Time value’s Gregorian date.
Instance Method Details
#to_gregorian_date ⇒ Object
Returns a Date object denoting the chronological Julian day corresponding to the Time value’s Gregorian date. Date objects returned by this method use the Gregorian calendar or proleptic Gregorian calendar for any value.
10 11 12 |
# File 'lib/core_ext/time.rb', line 10 def to_gregorian_date to_date_with_start(Date::GREGORIAN) end |
#to_julian_date ⇒ Object
Returns a Date object denoting the chronological Julian day corresponding to the Time value’s Gregorian date. Date objects returned by this method use the Julian calendar for any value.
17 18 19 |
# File 'lib/core_ext/time.rb', line 17 def to_julian_date to_date_with_start(Date::JULIAN) end |