Get the ISO 3166 country code from Time Zone

–> contryAndLocationKit.framework

AppleScript名:Get the ISO 3166 country code from Time Zone
— Created 2016-04-10 by Takaaki Naganoya
— 2016 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "contryAndLocationKit" –iospirit/NSTimeZone-ISCLLocation & BigZaphod/CLLocation-SunriseSunset
–https://github.com/iospirit/NSTimeZone-ISCLLocation
–https://github.com/BigZaphod/CLLocation-SunriseSunset

set aTZ to (current application’s NSTimeZone’s localTimeZone())’s |description|() as string
–>"Local Time Zone (Asia/Tokyo (JST) offset 32400)"

set aCountry to ((current application’s NSTimeZone’s localTimeZone())’s ISO3166CountryCode()) as list of string or string
–>  "JP"
–> missing value (error)

★Click Here to Open This Script 

Please follow and like us:

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です