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

Defined in:
build/mongoid-7.3/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.

Since:

  • 1.0.0



54
55
56
# File 'build/mongoid-7.3/lib/mongoid/criteria/queryable/extensions/date.rb', line 54

def evolve(object)
  object.__evolve_date__
end