Class: DateTime

Inherits:
Object show all
Defined in:
lib/sc-core-ext/date_time.rb

Overview

Instance Method Summary collapse

Instance Method Details

#to_fObject

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_iObject

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