module Origin::Extensions::Date
This module contains additional date behaviour.
Public Instance Methods
__evolve_date__()
click to toggle source
Evolve the date into a mongo friendly time, UTC midnight.
@example Evolve the date.
date.__evolve_date__
@return [ Time ] The date as a UTC time at midnight.
@since 1.0.0
# File lib/origin/extensions/date.rb, line 15 def __evolve_date__ ::Time.utc(year, month, day, 0, 0, 0, 0) end
__evolve_time__()
click to toggle source
Evolve the date into a time, which is always in the local timezone.
@example Evolve the date.
date.__evolve_time__
@return [ Time ] The date as a local time.
@since 1.0.0
# File lib/origin/extensions/date.rb, line 27 def __evolve_time__ ::Time.local(year, month, day) end