• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iWork 2013
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
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

References: 
 >Re: iWork 2013 (From: Shane Stanley <email@hidden>)
 >Re: iWork 2013 (From: "koenig.yvan" <email@hidden>)
 >Re: iWork 2013 (From: Deivy Petrescu <email@hidden>)
 >Re: iWork 2013 (From: "koenig.yvan" <email@hidden>)

  • Prev by Date: Re: iWork 2013
  • Next by Date: Re: Applescript make a comeback in Numbers
  • Previous by thread: Re: iWork 2013
  • Next by thread: Applescript make a comeback in Numbers
  • Index(es):
    • Date
    • Thread