Re: Days and hours
Re: Days and hours
- Subject: Re: Days and hours
- From: kai <email@hidden>
- Date: Tue, 25 Oct 2005 01:26:11 +0100
On 24 Oct 2005, at 22:42, Nigel Garvey wrote:
kai wrote on Mon, 24 Oct 2005 00:53:27 +0100:
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 believe that the D. is short for Derieadh - and that "Meán Fómhair"
and "Deireadh Fómhair" translate to "middle of autumn" and "end of
autumn" respectively. (But then I'm no authority on the subject.)
(I see the Irish for December is the
same as that for Christmas. That must hark back to before Christmas
started in October....) :-\
Ah yes, the good ol' days - before the marketing boys and girls
hijacked almost every tradition and religious celebration to turn
them into tediously drawn-out, sales-driven guilt trips for the rest
of us. Or am I just being cynical? (That's a rhetorical question.) ;-)
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.!
Why thank you, Mr G.! :-)
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
Good idea, Nigel. I was about to suggest...
-----------
tell it + (km - it) mod weeks + weeks to set l's end to space & date
string & space
-----------
... when, on 25 Oct 2005, at 01:01, you wrote:
Sorry. I posted the wrong experiment. You have to set day to 39 for
this
one to give yourself some floor room in the new months:
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 39
tell it + (km - it) mod weeks to set l's end to space & date
string & space
end repeat
end tell
- which is (of course) more efficient. :-)
- 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." :-)
I remember that well, too! Then there was a lengthy discourse that
began:
"I am the president of the Loyal Society for the Relief of Suffers
from Pismronunciation, for the relief of people who can’t say their
worms correctly, or who use the wrong worms entirely, so that other
people cannot underhand a bird they are spraying. It’s just that you
open your mouse, and the worms come turbling out in wuck a say that
you dick not what you’re thugging to be, and it’s very distressing..."
---
kai
_______________________________________________
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