Class: TwitterCldr::Timezones::TimezoneMetazone

Inherits:
Object
  • Object
show all
Defined in:
lib/twitter_cldr/timezones/zone_meta.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fromObject (readonly)

Returns the value of attribute from.



39
40
41
# File 'lib/twitter_cldr/timezones/zone_meta.rb', line 39

def from
  @from
end

#mz_idObject (readonly)

Returns the value of attribute mz_id.



39
40
41
# File 'lib/twitter_cldr/timezones/zone_meta.rb', line 39

def mz_id
  @mz_id
end

#toObject (readonly)

Returns the value of attribute to.



39
40
41
# File 'lib/twitter_cldr/timezones/zone_meta.rb', line 39

def to
  @to
end

#tz_idObject (readonly)

Returns the value of attribute tz_id.



39
40
41
# File 'lib/twitter_cldr/timezones/zone_meta.rb', line 39

def tz_id
  @tz_id
end

Instance Method Details

#includes?(date) ⇒ Boolean

Returns:

  • (Boolean)


41
42
43
44
# File 'lib/twitter_cldr/timezones/zone_meta.rb', line 41

def includes?(date)
  ts = date.strftime('%s').to_i
  ts >= from_ts && ts < to_ts
end

#metazoneObject



46
47
48
# File 'lib/twitter_cldr/timezones/zone_meta.rb', line 46

def metazone
  @metazone ||= Metazone.new(mz_id)
end