timezone_to_country 0.3.0 copy "timezone_to_country: ^0.3.0" to clipboard
timezone_to_country: ^0.3.0 copied to clipboard

outdated

Extension method for translation Time Zone Id to ISO 3166-1 alpha-2 code (e.g. 'Asia/Seoul' to 'KR')

timezone_to_country #

Extension method for translation Time Zone Id to ISO 3166-1 alpha-2 code (e.g. 'Asia/Seoul' to 'KR')

example

Usage #

TimeZoneToCountry.getCountryCode('Asia/Seoul')          // 'KR'
TimeZoneToCountry.getCountryCode('America/Los_Angeles') // 'US'
TimeZoneToCountry.getCountryCode('Europe/London')       // 'GB'
String code = await TimeZoneToCountry.getLocalCountryCode();
print(code);  // 'KR'

Source of Time Zone #

https://github.com/eggert/tz/blob/master/zone.tab

Unsupported Time Zones #

America/Godthab
America/Montreal
America/Santa_Isabel
Asia/Rangoon
Australia/Currie
Canada/Atlantic
Canada/Central
Canada/Eastern
Canada/Mountain
Canada/Newfoundland
Canada/Pacific
Pacific/Johnston
US/Alaska
US/Arizona
US/Central
US/Eastern
US/Hawaii
US/Mountain
US/Pacific
9
likes
0
pub points
91%
popularity

Publisher

unverified uploader

Extension method for translation Time Zone Id to ISO 3166-1 alpha-2 code (e.g. 'Asia/Seoul' to 'KR')

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, flutter_native_timezone, timezone

More

Packages that depend on timezone_to_country