Class: Time

Inherits:
Object show all
Defined in:
lib/time_crisis/conversions.rb

Instance Method Summary collapse

Instance Method Details

#to_tc_dateObject



16
17
18
# File 'lib/time_crisis/conversions.rb', line 16

def to_tc_date
  TimeCrisis::Date.civil(year, month, day)
end

#to_tc_datetimeObject



20
21
22
# File 'lib/time_crisis/conversions.rb', line 20

def to_tc_datetime
  TimeCrisis::DateTime.civil(year, month, day, hour, min, sec, 0, utc_offset)
end

#to_tc_timeObject



24
25
26
# File 'lib/time_crisis/conversions.rb', line 24

def to_tc_time
  TimeCrisis::Time.at(self.to_f)
end