Re: Date problems
Re: Date problems
- Subject: Re: Date problems
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 26 Aug 2002 01:32:19 -0700
On 8/26/02 12:36 AM, "Reinhold Penner" <email@hidden> wrote:
>
I need help. I'm getting a date back from a curl query in the form of
>
"Sun, 25 Aug 2002 16:24:16". Now in Jaguar everything is hunky dory,
>
since
>
>
set myDate to "Sun, 25 Aug 2002 16:24:16"
>
return date myDate
>
--> date "Sunday, August 25, 2002 16:24:16"
>
>
In 10.1.5, I get "Can't make "Sun, 25 Aug 2002 16:24:16" into a date".
>
So what I need is a simple and efficient way to transform the myDate
>
string into something that can be coerced into a date on both OS.
Try
tell me to set myDate to date "Sun, 25 Aug 2002 16:24:16"
return myDate
I noticed that AS 1.8.3 had reverted to needing 'tell me' when in an
application tell block, as we used to have to do up until about AS 1.6 or so
(maybe 1.5.5).
>
>
There's an additional headache with this, since I have no idea how
>
language-specific these date coercions are anyway. For example, if I
>
process myDate to something that can be coerced to a date on my US
>
system, will that also work on a user's computer that has French or
>
German date settings? If not, how can I convert the above myDate into
>
something that every Mac can recognize as a date?
Once you compile a date, it is now a date data type and will work perfectly
in any localization Try it yourself: save the above scriptlet in Script
Editor as a script, go to International System Prefs and change your date
format to French, and open up the script.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
References: | |
| >Date problems (From: Reinhold Penner <email@hidden>) |