kyle-seongwoo-jun / flutter_timezone_to_country

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

Home Page:https://pub.dev/packages/timezone_to_country

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

timezone_to_country

pub package pub points device_info_plus

Library 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

IANA - Time Zone Database - 2023c (https://github.com/eggert/tz/blob/2023c/zone.tab)

About

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

https://pub.dev/packages/timezone_to_country

License:MIT License


Languages

Language:Dart 81.3%Language:Ruby 8.9%Language:HTML 5.0%Language:Swift 4.2%Language:Kotlin 0.4%Language:Objective-C 0.1%