Class DataMapper::Property::DateTime
In: lib/dm-core/property/date_time.rb
Parent: Object

Methods

Included Modules

PassThroughLoadDump Typecast::Time

Public Instance methods

Creates a DateTime instance from a Hash with keys :year, :month, :day, :hour, :min, :sec

@param [to_mash] value

  value to be typecast

@return [DateTime]

  DateTime constructed from hash

@api private

Typecasts an arbitrary value to a DateTime. Handles both Hashes and DateTime instances.

@param [to_mash, to_s] value

  value to be typecast

@return [DateTime]

  DateTime constructed from value

@api private

[Validate]