Re: Localize weekdays
Re: Localize weekdays
- Subject: Re: Localize weekdays
- From: Christian Vinaa <email@hidden>
- Date: Fri, 28 Jan 2005 10:52:43 +0100
at last a problem that I might be able to answer :-)))
(and I stress *might* )
i have kinda the same thing I wanted to do;
i wanted to have a script write to an apple works doc. a 'day-code'
Monday would be CVlu tuesday would be CVma
(dont ask why)
so I made this script up based on the date format:
***script**
on day_data_of(this_date_object)
set this_day to the weekday of this_date_object
set day_listA to {Monday, Tuesday, Wednesday, Thursday,
Friday, Saturday, Sunday}
set day_listB to {"CVlu", "CVma", "CVme", "CVje", "CVve",
"CVsa", "CVdi"}
repeat with i from 1 to the number of items in day_listA
if this_day is item i of day_listA then
set the day_string to item i of day_listB
set the day_index to i
return {day_string}
end if
end repeat
end day_data_of
set myDay to day_data_of(current date) as text
set the clipboard to the myDay
tell application "AppleWorks 6"
activate
paste
end tell**end script**
At 20:09 -0800 27/01/2005, Paul Berkowitz wrote:
On 1/27/05 5:46 PM, "Sander Tekelenburg" <email@hidden> wrote:
At 00:26 +0100 UTC, on 2005/01/28, jj wrote:
[...]
(current date) as text --> "viernes, 28 enero 2005 00:08:57"
But I don't think I can pick "viernes" from this string, since I don't know
if word-of-dateAsText-which-is-not-a-number is a weekday or a month name...
Right. So ask for the weekday specifically ;)
weekday of (current date)
->Viernes
Did you really did test that? I don't believe it. You're making it up, for
reasons known best to yourself. Can't be bothered to test?
'weekday', like 'month', results in a _constant_ which looks like the
English name of the weekday. No matter what you set the International Date
System Preference to, the result is always Thursday, Friday, etc. Never,
ever Viernes.
--
Paul Berkowitz
_______________________________________________
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
--
Christian Vinaa
email@hidden
...... Meanwhile, aunt Martha, having taken a tramp in the woods,
is lying in a ditch at the edge of town .........................
_______________________________________________
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