Module: Stardate::SFloat
- Defined in:
- lib/stardate.rb
Instance Method Summary collapse
Instance Method Details
#to_time ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/stardate.rb', line 19 def to_time y = 1000 s = y / YEAR_DURATION / 24 / 3600 year = (self / y).to_i seconds = ((self - (year * 1000)) / s).to_i d = Time.new(year + YEAR_O) + seconds.seconds end |