Re: Date/time weirdness
Re: Date/time weirdness
- Subject: Re: Date/time weirdness
- From: Graff <email@hidden>
- Date: Thu, 29 Jul 2004 11:35:32 -0400
Apparently it is taking the string "16/15/14" and treating it as if it
is "16:15:14" of today's date. It then converts the 24 hour time to 12
hour time and you get:
--> date "Thursday, July 29, 2004 4:15:14 PM"
This is probably because there is no 16th month so it figures you are
trying to set the time, not the date. If you try this it works fine:
set foo to "12/15/14"
date foo
--> date "Monday, December 15, 2014 12:00:00 AM"
The string parser for the date format does all sorts of weird things in
its attempt to make a date out of a string. Try these:
set foo to "12:00 16/15/14"
date foo
--> date "Thursday, July 29, 2004 12:00:16 PM"
set foo to "12 16/15/14"
date foo
--> date "Wednesday, December 16, 2015 2:00:00 PM"
set foo to "12:15:14 16/15/14"
date foo
--> date "Monday, December 15, 2014 4:15:14 PM"
It looks like it looks for a valid date first and then it tries for a
time.
- Ken
On Jul 29, 2004, at 10:42 AM, Michelle Steiner wrote:
Exactly what is going on here?
set foo to "16/15/14"
date foo
--> date "Thursday, July 29, 2004 4:15:14 PM"
The minutes and seconds correspond to the last two integers expressed
in the string. The hours vary with the first integer, but I can't
figure out the exact relationship. The date is the current date.
_______________________________________________
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.