• 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
month contants and dates...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

month contants and dates...


  • Subject: month contants and dates...
  • From: Jean-Christophe Helary <email@hidden>
  • Date: Sun, 17 May 2015 22:04:14 +0900

I've noticed that whatever the locale is, the "month of [date]" is always an English month. I guess that's what the Language Reference means by saying months are constants.

Now, what I am trying to do is get the number of the month of an Applescript date and for that I first create a list of English months and then run a loop and check if my "month of [date]" is equal to a list member. If yes, I assign the index value of the match to a variable I'll use later to create what I call a "string date" (ie not what AS would recognise as a date, but just what I need to create a string with mm.dd is required.

So, I'm wondering, if the months are constants, whether there is not a smarter way to access them.

What am thinking would look like (in an arbitrary syntax):

return index of (month of my_date) in {list of months contants}

It that something possible in AS or should I stick to my look ?

Jean-Christophe Helary
 _______________________________________________
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


  • Follow-Ups:
    • Re: month contants and dates...
      • From: Axel Luttgens <email@hidden>
    • Re: month contants and dates...
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Re: Determining the default CalendarName in Calendar
  • Next by Date: Preferences and l10n
  • Previous by thread: Re: Determining the default CalendarName in Calendar
  • Next by thread: Re: month contants and dates...
  • Index(es):
    • Date
    • Thread