Localized Internals of AppleScript (date Class for example)
Localized Internals of AppleScript (date Class for example)
- Subject: Localized Internals of AppleScript (date Class for example)
- From: Emile Schwarz <email@hidden>
- Date: Thu, 14 Apr 2005 23:34:01 +0200
Hi all,
I was fooling around with the Date Class and found surprising stuff: some parts
are 'localized' and some other part are not !
Examples:
a. This example store and show a date:
set Now to date "jeudi 14 avril 2005 0:00:00"
return Now
Nota. I entered a different string. It was:
set Now to date "14/04/2005"
the Script Editor changed my string to:
set Now to date "jeudi 14 avril 2005 0:00:00"
(it refused: set Now to date "04/14/2005" since this is not a French date).
b. Get the day name of the week:
set Now to date "jeudi 14 avril 2005 0:00:00"
return weekday of Now
The returned string is: Thursday.
WHY ?
This is a question: How can I get the Date part of a Date Class Instance ?
The Language Reference states:
<quote>
Property: Date
Description: A string that consists of the date portion of the date value; for
example,"June 3, 1993".
</quote>
And I coudn't make:
set zeDate to date of current date
set zeDate to date of (current date)
but I can use:
set zeMonth to month of (current date)
return zeMonth
and I get April.
Ideas ?
Emile
_______________________________________________
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