• 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: Days and hours
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Days and hours


  • Subject: Re: Days and hours
  • From: "Nigel Garvey" <email@hidden>
  • Date: Wed, 19 Oct 2005 21:44:56 +0100

Bernard Azancot wrote on Wed, 19 Oct 2005 13:09:21 +0200:

>> From: Michelle Steiner <email@hidden>

>> set mon to (choose from list {January, February, March, April, May,
>> June, July, August, September, October, November, December} with
>> title "Employment month" with prompt "Enter the month for which you
>> wish to compute hours worked." default items {month of working_month})
>> try...
>
>I would like to know how could I translate this list in a french user
>friendly list and make the script function without issue.
>
>{Janvier, Fevrier, Mars, Avril, Mai, Juin, Juillet, Aout, Septembre,
>Octobre, Novembre, Decembre}

Does this do it?

  set d2 to date ("1 1 1" as string) -- January on any machine.
  set theDigits to "123"

  set monthWords to {}
  considering case
    repeat 12 times
      set d1 to d2
      set d1's day to 28
      set d2 to d1 + weeks -- Same weekday, following month.

      set w1 to words of d1's date string
      set w2 to words of d2's date string

      repeat with i from 1 to (count w1)
        set thisWord to item i of w1
        if not ((thisWord is item i of w2) or (character 1 of thisWord is
in theDigits)) then
          set end of monthWords to thisWord
          exit repeat
        end if
      end repeat
    end repeat
  end considering

  choose from list monthWords


NG

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Days and hours
      • From: kai <email@hidden>
  • Prev by Date: coercing text to time
  • Next by Date: Re: Physical size of the trash
  • Previous by thread: Re: Days and hours
  • Next by thread: Re: Days and hours
  • Index(es):
    • Date
    • Thread