• 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: Mon, 24 Oct 2005 22:42:38 +0100

kai wrote on Mon, 24 Oct 2005 00:53:27 +0100:

>On 20 Oct 2005, at 13:46, Nigel Garvey wrote:
>
>> Of course, we've both made the unconscious assumption that the name
>> of every month in the local language will consist of just one word....
>
>Yeah, I hadn't considered that, Nigel - even though I'd come across
>examples of multiple-word month names previously. (The Irish names
>for September and October, for example, being "Meán Fómhair" and "D.
>Fómhair" respectively.)

Interesting. I wonder what "D." stands for. "D. Fómhair" doesn't compile
back to a date in Jaguar, but the other Irish months are OK and there
appears to be no problem in Tiger. (I see the Irish for December is the
same as that for Christmas. That must hark back to before Christmas
started in October....)  :-\


>The following variation confines the weekday of compared dates to
>Monday - and attempts to preserve month names of more than one word...

It seems to do the trick very effectively. Well done, Mr. E.!

>on localizedMonths()
>     set l to {}
>     tell "1 1 1" to tell (my date it) - days to repeat 12 times
>         set day to 32
>         tell it + days * (9 - (its weekday)) to set l's end to space
>& date string & space
>     end repeat

Here's a minor modification for compatibility with systems that don't
have the weekday-to-integer coercion:

  on localizedMonths()
    tell "1 1 1" to tell (my date it)
      copy it to km -- "Known Monday"
      set l to {space & date string & space}
      repeat 11 times
        set day to 32
        tell it + (km - it) mod weeks to set l's end to space & date
string & space
      end repeat
    end tell



>- As only Ronnie Barker could! :-)
>
>I still chuckle about some of his other forms of wordplay, too. This
>has got to be one of my all-time favourites:
>
>http://pegnsean.net/~occupant/candle01.htm

Ah yes. The Two Ronnies' classic. I rather liked one of their "news
items" from many years ago: "Idi Amin was rushed to hospital today after
falling into a vat of peroxide. His condition is said to be fair."  :-)

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>
    • Re: Days and hours
      • From: "Nigel Garvey" <email@hidden>
  • Prev by Date: Re: Finding \t, \r, \n reliably
  • Next by Date: Re: Finding \t, \r, \n reliably
  • Previous by thread: Re: Days and hours
  • Next by thread: Re: Days and hours
  • Index(es):
    • Date
    • Thread