AppleScript名:午前午後のローカライズ名称を返す |
— Created 2017-12-19 01:14:42 +0900 by Takaaki Naganoya — 2017 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" set bList to getLocalizedAMSymbol("ja_JP") of me –> "午前" set bList to getLocalizedPMSymbol("ja_JP") of me –> "午後" –ローカライズされた午前の名称を返す on getLocalizedAMSymbol(aLoc) set df to current application’s NSDateFormatter’s alloc()’s init() df’s setLocale:(current application’s NSLocale’s localeWithLocaleIdentifier:aLoc) set dayNames to df’s AMSymbol() return dayNames as string end getLocalizedAMSymbol –ローカライズされた午後の名称を返す on getLocalizedPMSymbol(aLoc) set df to current application’s NSDateFormatter’s alloc()’s init() df’s setLocale:(current application’s NSLocale’s localeWithLocaleIdentifier:aLoc) set dayNames to df’s PMSymbol() return dayNames as string end getLocalizedPMSymbol |
More from my site
(Visited 26 times, 1 visits today)