Class: DateTime

Inherits:
Object
  • Object
show all
Defined in:
lib/supplement/date.rb

Instance Method Summary collapse

Instance Method Details

#to_dateObject



121
# File 'lib/supplement/date.rb', line 121

def to_date     ; Date.new! Date.jd_to_ajd(jd,0,0), 0, @sg ; end

#to_datetimeObject



122
# File 'lib/supplement/date.rb', line 122

def to_datetime ; self ; end

#to_timeObject



116
117
118
119
120
# File 'lib/supplement/date.rb', line 116

def to_time
  (new_offset 0).instance_eval do
    Time.utc year, mon, mday, hour, min, sec + sec_fraction
  end.getlocal
end