module FFXIV::Utils

Public Class Methods

data_center(server) click to toggle source
# File lib/ffxiv/utils.rb, line 58
def data_center(server)
  self.servers.each do |dc, srvs|
    return dc if srvs.include? server
  end
end
ed2gd(ed) click to toggle source
# File lib/ffxiv/utils.rb, line 47
def ed2gd(ed)
  partials = ed.match(/^(\d+).+([1-6].*)$/)
  # Wanted to use 2013 as year, but 2013 is not a leap year, resulting in invalid format error on deriving a birthday if nameday is "32st Sun of the 1st Umbral Moon".
  # Use the closest year here since year value is not relevant anyways.
  Date.new(2012, @@eorzean_months[partials[2]], @@eorzean_days[partials[2]][partials[1].to_i])
end
servers() click to toggle source
# File lib/ffxiv/utils.rb, line 54
def servers
  @@servers
end