Coerce Float values
Coerce given value to a DateTime
@example
datetime = Coercible::Coercion::Float.to_datetime(1000000000.999) # => Sun, 09 Sep 2001 01:46:40 +0000 datetime.to_f # => 1000000000.999
@param [Float] value
@return [DateTime]
@api public
# File lib/coercible/coercer/float.rb, line 33 def to_datetime(value) ::DateTime.strptime((value * 10**3).to_s, "%Q") end
Generated with the Darkfish Rdoc Generator 2.