Module: FeCoreExt::CoreExt::Date

Included in:
Date
Defined in:
lib/fe_core_ext/core_ext/date.rb

Instance Method Summary collapse

Instance Method Details

#end_of_month?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/fe_core_ext/core_ext/date.rb', line 8

def end_of_month?
  self == end_of_month
end

#range(duration) ⇒ Object



12
13
14
# File 'lib/fe_core_ext/core_ext/date.rb', line 12

def range(duration)
  Range.new(*[self + duration, self].minmax)
end

#to_time_rangeObject



16
17
18
# File 'lib/fe_core_ext/core_ext/date.rb', line 16

def to_time_range
  Range.new(beginning_of_day, end_of_day)
end