lib/darian_calendar/time.rb
# Converts the given mars time to earth time
# @return [Time] earth time
Converts the given mars time to earth time
Converts the given mars time to earth time
def to_earth
      earth_days = (@total_sols * DarianCalendar::MARS_TO_EARTH_DAYS) + DarianCalendar::EPOCH_OFFSET + DarianCalendar::ROUND_UP_SECOND
      earth_seconds = ((earth_days - DarianCalendar::E_DAYS_TIL_UNIX) * DarianCalendar::SECONDS_A_DAY) - 1
      ::Time.at(earth_seconds)
    end
def to_earth earth_days = ( @total_sols * DarianCalendar :: MARS_TO_EARTH_DAYS ) + DarianCalendar :: EPOCH_OFFSET + DarianCalendar :: ROUND_UP_SECOND earth_seconds = ( ( earth_days - DarianCalendar :: E_DAYS_TIL_UNIX ) * DarianCalendar :: SECONDS_A_DAY ) - 1 :: Time . at ( earth_seconds ) end
Converts the given mars time to earth time
Converts the given mars time to earth time
None
Time