Class: Date

Inherits:
Object show all
Extended by:
TimeCrisis::DateRange::Date::ClassMethods, TimeCrisis::NamedMonths
Defined in:
lib/time_crisis/conversions.rb

Instance Method Summary collapse

Methods included from TimeCrisis::NamedMonths

april, august, december, february, january, july, june, march, may, month_range, november, october, september

Methods included from TimeCrisis::DateRange::Date::ClassMethods

range

Instance Method Details

#to_tc_dateObject



2
3
4
# File 'lib/time_crisis/conversions.rb', line 2

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

#to_tc_datetimeObject



6
7
8
# File 'lib/time_crisis/conversions.rb', line 6

def to_tc_datetime
  TimeCrisis::DateTime.civil(year, month, day, 0, 0, 0, 0)
end

#to_tc_time(form = :local) ⇒ Object



10
11
12
# File 'lib/time_crisis/conversions.rb', line 10

def to_tc_time(form = :local)
  ::TimeCrisis::Time.send(form, year, month, day)
end