Module: Mongoid::Criteria::Queryable::Extensions::Date::ClassMethods

Defined in:
build/mongoid-7.4/lib/mongoid/criteria/queryable/extensions/date.rb

Instance Method Summary collapse

Instance Method Details

#evolve(object) ⇒ Time

Evolve the object to an date.

Examples:

Evolve dates.

Date.evolve(Date.new(1990, 1, 1))

Evolve string dates.

Date.evolve("1990-1-1")

Evolve date ranges.

Date.evolve(Date.new(1990, 1, 1)..Date.new(1990, 1, 4))

Parameters:

  • object (Object)

    The object to evolve.

Returns:

  • (Time)

    The evolved date.



47
48
49
# File 'build/mongoid-7.4/lib/mongoid/criteria/queryable/extensions/date.rb', line 47

def evolve(object)
  object.__evolve_date__
end