Module: Mongoid::Criteria::Queryable::Extensions::Date
- Defined in:
- lib/mongoid/criteria/queryable/extensions/date.rb
Overview
This module contains additional date behaviour.
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#__evolve_date__ ⇒ Time
Evolve the date into a mongo friendly time, UTC midnight.
-
#__evolve_time__ ⇒ Time
Evolve the date into a time, which is always in the local timezone.
Instance Method Details
#__evolve_date__ ⇒ Time
Evolve the date into a mongo friendly time, UTC midnight.
18 19 20 |
# File 'lib/mongoid/criteria/queryable/extensions/date.rb', line 18 def __evolve_date__ ::Time.utc(year, month, day, 0, 0, 0, 0) end |
#__evolve_time__ ⇒ Time
Evolve the date into a time, which is always in the local timezone.
30 31 32 |
# File 'lib/mongoid/criteria/queryable/extensions/date.rb', line 30 def __evolve_time__ ::Time.local(year, month, day) end |