Re: iWork 2013
Re: iWork 2013
- Subject: Re: iWork 2013
- From: Shane Stanley <email@hidden>
- Date: Sun, 26 Jan 2014 12:10:30 +1100
On 26 Jan 2014, at 4:23 am, koenig.yvan <email@hidden> wrote:
# localized month names and day names in Numbers 3.1
It's easier to just ask the system via an ASOBjC-based library. This will get you the month names:
use framework "Foundation"
on monthNames() set fm to current application's NSDateFormatter's new() -- fm's setLocale:(current application's NSLocale's localeWithLocaleIdentifier:"ru") return fm's monthSymbols() as list end monthNames
Uncomment the line if you want to use a specific locale, otherwise it will reflect the user's current locale.
For weekday names:
on dayNames() set fm to current application's NSDateFormatter's new() -- fm's setLocale:(current application's NSLocale's localeWithLocaleIdentifier:"ru") return fm's weekdaySymbols() as list end dayNames
if you want the short versions, use shortWeekdaySymbols() or veryShortWeekdaySymbols(), and similar for months. Other methods you might want are AMSymbol(), PMSymbol(), quarterSymbols(), shortQuarterSymbols(), eraSymbols() and longEraSymbols().
As well, in some locales month and weekday names are different in a standalone context than as part of fuller date. For those cases, you can use standaloneMonthSymbols(), &c, &c.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden