Class | TZInfo::Country |
In: |
lib/tzinfo/country.rb
|
Parent: | Object |
An ISO 3166 country. Can be used to get a list of Timezones for a country. For example:
us = Country.get('US') us.zone_identifiers us.zones us.zone_info
Gets a Country by its ISO 3166 code. Raises an InvalidCountryCode exception if it couldn‘t be found.
Compare two Countries based on their code. Returns -1 if c is less than self, 0 if c is equal to self and +1 if c is greater than self.
Returns a frozen array of all the zone identifiers for the country. These are in an order that
(1) makes some geographical sense, and (2) puts the most populous zones first, where that does not contradict (1).
Returns a frozen array of all the timezones for the for the country as CountryTimezone instances (containing extra information about each zone). These are in an order that
(1) makes some geographical sense, and (2) puts the most populous zones first, where that does not contradict (1).
An array of all the Timezones for this country. Returns TimezoneProxy objects to avoid the overhead of loading Timezone definitions until a conversion is actually required. The Timezones are returned in an order that
(1) makes some geographical sense, and (2) puts the most populous zones first, where that does not contradict (1).