class TZInfo::TZDataFormat
:nodoc:
substitution (%s) format or a fixed string.
A tz data Zone format string. Either alternate standard/daylight-savings,
def expand(std_offset, rule_string)
def expand(std_offset, rule_string) if @type == :alternate if std_offset == 0 @standard_abbrev else @daylight_abbrev end elsif @type == :subst sprintf(@abbrev, rule_string) else @abbrev end end
def fixed?
def fixed? @type == :fixed end
def initialize(spec)
substitution (%s) format or a fixed string.
A tz data Zone format string. Either alternate standard/daylight-savings,
def initialize(spec) if spec =~ /([A-z]+)\/([A-z]+)/ @type = :alternate @standard_abbrev = $1 @daylight_abbrev = $2 elsif spec =~ /%s/ @type = :subst @abbrev = spec else @type = :fixed @abbrev = spec end end
def requires_rule_string?
def requires_rule_string? @type == :subst end