Module: FFXI::Common
Constant Summary
Constants included
from Constants
FFXI::Constants::BASIS_DATE, FFXI::Constants::DAY, FFXI::Constants::HOUR, FFXI::Constants::MINUTE, FFXI::Constants::MOON_DATE, FFXI::Constants::MS_BASIS_DATE, FFXI::Constants::MS_BASIS_VANA, FFXI::Constants::MS_DAY, FFXI::Constants::MS_GAME_DAY, FFXI::Constants::MS_HOUR, FFXI::Constants::MS_MINUTE, FFXI::Constants::MS_MONTH, FFXI::Constants::MS_MOON_DATE, FFXI::Constants::MS_SECOND, FFXI::Constants::MS_YEAR
Class Method Summary
collapse
Class Method Details
.earth_to_vana(earth_time) ⇒ Object
10
11
12
13
|
# File 'lib/Vana/common.rb', line 10
def self.earth_to_vana(earth_time)
((898 * 360 + 30) * MS_DAY) + ((earth_time.to_f * MS_SECOND) -
MS_BASIS_DATE) * 25
end
|
.vana_to_earth(vana_time) ⇒ Object
5
6
7
8
|
# File 'lib/Vana/common.rb', line 5
def self.vana_to_earth(vana_time)
(((vana_time.to_f - ((898 * 360 + 30) * MS_DAY.to_f)) / 25) +
MS_BASIS_DATE.to_f) / MS_SECOND
end
|