Class: Date
- Inherits:
-
Object
- Object
- Date
- Defined in:
- lib/radar/app/core_ext/date.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.on(unix_time) ⇒ Object
8 9 10 |
# File 'lib/radar/app/core_ext/date.rb', line 8 def self.on(unix_time) Time.at(unix_time).utc.to_date end |
Instance Method Details
#to_i ⇒ Object
4 5 6 |
# File 'lib/radar/app/core_ext/date.rb', line 4 def to_i to_utc_time.to_i end |
#to_utc_time ⇒ Object
12 13 14 |
# File 'lib/radar/app/core_ext/date.rb', line 12 def to_utc_time Time.utc(year, month, day) end |