instance method
to_f
Ruby on Rails 7.0.10
Since v3.0.20Signature
to_f()
Converts self to a floating-point number of seconds, including fractional microseconds, since the Unix epoch.
Source
# File activesupport/lib/active_support/core_ext/date_time/conversions.rb, line 79
def to_f
seconds_since_unix_epoch.to_f + sec_fraction
end
Defined in activesupport/lib/active_support/core_ext/date_time/conversions.rb line 79
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in DateTime