Parent

Files

TZInfo::CountryTimezone

A Timezone within a Country. This contains extra information about the Timezone that is specific to the Country (a Timezone could be used by multiple countries).

Attributes

identifier[R]

The zone identifier.

description[R]

A description of this timezone in relation to the country, e.g. “Eastern Time”. This is usually nil for countries having only a single Timezone.

Public Instance Methods

==(ct) click to toggle source

Returns true if and only if the given CountryTimezone is equal to the current CountryTimezone (has the same identifer, latitude, longitude and description).

    # File lib/tzinfo/country_timezone.rb, line 76
76:     def ==(ct)
77:       ct.respond_to?(:identifier) && ct.respond_to?(:latitude) &&
78:       ct.respond_to?(:longitude)  && ct.respond_to?(:description) &&
79:       identifier == ct.identifier  && latitude == ct.latitude &&
80:       longitude == ct.longitude   && description == ct.description         
81:     end
description_or_friendly_identifier() click to toggle source

if description is not nil, this method returns description; otherwise it returns timezone.friendly_identifier(true).

    # File lib/tzinfo/country_timezone.rb, line 59
59:     def description_or_friendly_identifier
60:       description || timezone.friendly_identifier(true)
61:     end
eql?(ct) click to toggle source

Returns true if and only if the given CountryTimezone is equal to the current CountryTimezone (has the same identifer, latitude, longitude and description).

    # File lib/tzinfo/country_timezone.rb, line 86
86:     def eql?(ct)
87:       self == ct
88:     end
hash() click to toggle source

Returns a hash of this CountryTimezone.

    # File lib/tzinfo/country_timezone.rb, line 91
91:     def hash
92:       @identifier.hash ^ @latitude_numerator.hash ^ @latitude_denominator.hash ^ 
93:         @longitude_numerator.hash ^ @longitude_denominator.hash ^ @description.hash
94:     end
inspect() click to toggle source

Returns internal object state as a programmer-readable string.

    # File lib/tzinfo/country_timezone.rb, line 97
97:     def inspect
98:       "#<#{self.class}: #@identifier>"
99:     end
latitude() click to toggle source

The latitude of this timezone in degrees as a Rational.

    # File lib/tzinfo/country_timezone.rb, line 64
64:     def latitude
65:       @latitude ||= RubyCoreSupport.rational_new!(@latitude_numerator, @latitude_denominator)
66:     end
longitude() click to toggle source

The longitude of this timezone in degrees as a Rational.

    # File lib/tzinfo/country_timezone.rb, line 69
69:     def longitude
70:       @longitude ||= RubyCoreSupport.rational_new!(@longitude_numerator, @longitude_denominator)
71:     end
timezone() click to toggle source

The Timezone (actually a TimezoneProxy for performance reasons).

    # File lib/tzinfo/country_timezone.rb, line 53
53:     def timezone
54:       Timezone.get_proxy(@identifier)
55:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.