Class Time
In: date.rb
Parent: Object

Methods

Public Instance methods

[Source]

# File date.rb, line 1266
  def to_date
    jd = Date.civil_to_jd(year, mon, mday, Date::ITALY)
    Date.new0(Date.jd_to_ajd(jd, 0, 0), 0, Date::ITALY)
  end

[Source]

# File date.rb, line 1271
  def to_datetime
    jd = DateTime.civil_to_jd(year, mon, mday, DateTime::ITALY)
    fr = DateTime.time_to_day_fraction(hour, min, [sec, 59].min) +
         usec.to_r/86400000000
    of = utc_offset.to_r/86400
    DateTime.new0(DateTime.jd_to_ajd(jd, fr, of), of, DateTime::ITALY)
  end

[Source]

# File date.rb, line 1264
  def to_time() getlocal end

[Validate]