Troubles with the date class (doc)
Troubles with the date class (doc)
- Subject: Troubles with the date class (doc)
- From: Emile Schwarz <email@hidden>
- Date: Tue, 04 Jul 2006 18:34:37 +0200
The AppleScript (Old) Language Reference, for the date class states
incorrectly:
time string of date "March 3, 1999"
--result: "12:00:00 AM"
Of course, in my French 10.4.7, I have to write:
time string of date "3 mars 1999"
and that value is translated to:
time string of date "mercredi 3 mars 1999 0:00:00"
and naturally, the returned value is changed to:
"0:00:00"
So the following description is false:
<quote>
If you don't specify a complete date, day, and time when typing a Date
value, AppleScript fills in information as needed. If you don't specify
the date information, AppleScript uses the date when the script is
compiled. If you don't specify the time information, 12:00 AM (midnight)
is the default. If you omit AM or PM, AM is the default; however, if you
specify 12:00 without AM or PM, 12:00 PM is the default. If you specify
a time using 24-hour time, AppleScript converts it to the equivalent
time using AM or PM (when the Date & Time control panel is set for
12-hour time); for example, 17:00 is equivalent to 5:00PM.
The following example shows how AppleScript fills in a default time
property when the specified date doesn't include the time:
time string of date "March 3, 1999"
--result: "12:00:00 AM"
</quote>
FWIW,
Emile
pdf name / version / date / owner informations:
From "AppleScript Language Guide, For AppleScript 1.3.7"
05/MAY/1999 © Apple Computer, Inc.
_______________________________________________
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