Class: Date
Constant Summary collapse
- FOS_JD_OFFSET_DAYS =
Date.parse('1899-12-31').jd
Class Method Summary collapse
Instance Method Summary collapse
- #to_fos_days ⇒ Object
-
#to_gm_time ⇒ Object
from Ruby Cookbook #########.
- #to_local_time ⇒ Object
Class Method Details
.from_fos_days(days) ⇒ Object
6 7 8 |
# File 'lib/sequel/fos_dates.rb', line 6 def self.from_fos_days(days) self.jd(FOS_JD_OFFSET_DAYS + days) end |
Instance Method Details
#to_fos_days ⇒ Object
10 11 12 |
# File 'lib/sequel/fos_dates.rb', line 10 def to_fos_days jd - FOS_JD_OFFSET_DAYS end |
#to_gm_time ⇒ Object
from Ruby Cookbook #########
15 16 17 |
# File 'lib/sequel/fos_dates.rb', line 15 def to_gm_time to_time_special(new_offset, :gm) end |