Class: DateTime
Overview
Instance Method Summary collapse
-
#to_f ⇒ Object
Converts self to a float number of seconds since the Unix epoch.
-
#to_i ⇒ Object
Converts self to an integer number of seconds since the Unix epoch.
Instance Method Details
#to_f ⇒ Object
Converts self to a float number of seconds since the Unix epoch
5 6 7 |
# File 'lib/sc-core-ext/date_time.rb', line 5 def to_f seconds_since_unix_epoch.to_f end |
#to_i ⇒ Object
Converts self to an integer number of seconds since the Unix epoch
10 11 12 |
# File 'lib/sc-core-ext/date_time.rb', line 10 def to_i seconds_since_unix_epoch.to_i end |