Module: Stardate

Defined in:
lib/stardate.rb,
lib/stardate/version.rb

Defined Under Namespace

Modules: SFloat, STime

Constant Summary collapse

YEAR_DURATION =

Average value of a calendar year, considering the occurrence of leap years, in accordance with the inferred Stardates in Star Trek FAQ by Andrew Main

365.2425
BASE_DATE =
Struct.new(:year, :stardate).new(2323, 0.0)
VERSION =
'0.1.0'.freeze

Class Method Summary collapse

Class Method Details

.set_base_date_to_2005Object



17
18
19
20
# File 'lib/stardate.rb', line 17

def self.set_base_date_to_2005
  BASE_DATE.year = 2005
  BASE_DATE.stardate = 58_000.0
end

.set_base_date_to_2323Object



12
13
14
15
# File 'lib/stardate.rb', line 12

def self.set_base_date_to_2323
  BASE_DATE.year = 2323
  BASE_DATE.stardate = 0.0
end