Re: Troubles with the date class (doc)
Re: Troubles with the date class (doc)
- Subject: Re: Troubles with the date class (doc)
- From: Christopher Nebel <email@hidden>
- Date: Wed, 5 Jul 2006 09:58:39 -0700
On Jul 4, 2006, at 9:34 AM, Emile Schwarz wrote:
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>
Sounds like it's correct up to the last sentence, where it should say
something more like "whether you specify 12- or 24-hour time,
AppleScript will convert it to the time format you have specified in
the International system preference pane." (I'm not sure about the
"if you use 12-hour time" bit -- do French systems still understand
AM/PM?)
All number- and date-to-string conversions use your international
settings, *not* English as the ASLG sometimes implies.
--Chris Nebel
AppleScript Engineering
_______________________________________________
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