Class/Module Index [+]

Quicksearch

Mongoid::Extensions::Date

Constants

EPOCH

Constant for epoch - used when passing invalid times.

Public Instance Methods

__mongoize_time__() click to toggle source

Convert the date into a time.

@example Convert the date to a time.

date.__mongoize_time__

@return [ Time ] The converted time.

@since 3.0.0

# File lib/mongoid/extensions/date.rb, line 16
def __mongoize_time__
  ::Time.configured.local(year, month, day)
end
mongoize() click to toggle source

Turn the object from the ruby type we deal with to a Mongo friendly type.

@example Mongoize the object.

date.mongoize

@return [ Time ] The object mongoized.

@since 3.0.0

# File lib/mongoid/extensions/date.rb, line 29
def mongoize
  ::Date.mongoize(self)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.