Module: Mongoid::Criteria::Queryable::Extensions::TimeWithZone

Defined in:
build/mongoid-8.1/lib/mongoid/criteria/queryable/extensions/time_with_zone.rb

Overview

This module contains additional time with zone behavior.

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#__evolve_date__Time

Evolve the time as a date, UTC midnight.

Examples:

Evolve the time to a date query format.

time.__evolve_date__

Returns:

  • (Time)

    The date at midnight UTC.



17
18
19
# File 'build/mongoid-8.1/lib/mongoid/criteria/queryable/extensions/time_with_zone.rb', line 17

def __evolve_date__
  ::Time.utc(year, month, day, 0, 0, 0, 0)
end

#__evolve_time__Time

Evolve the time into a utc time.

Examples:

Evolve the time.

time.__evolve_time__

Returns:

  • (Time)

    The time in UTC.



27
28
29
# File 'build/mongoid-8.1/lib/mongoid/criteria/queryable/extensions/time_with_zone.rb', line 27

def __evolve_time__
  utc
end