Re: Applescript can't tell time?
Re: Applescript can't tell time?
- Subject: Re: Applescript can't tell time?
- From: Doug McNutt <email@hidden>
- Date: Tue, 3 Feb 2004 10:54:58 -0700
It looks to me as though you're comparing two text strings and the AM/PM is not even being considered because the comparison stops with the first character.
24 hour clock?
Convert to epoch seconds?
Both are probably impossible in AppleScript.
At 10:01 -0700 2/3/04, Robert Poland wrote:
>
set nowDate to (current date)
>
set nowTime to "" & time string of (nowDate)
>
set bedTime to "8:59.00 PM" as text --> "8:59.00 PM"
>
set nowTime to nowTime as text --> "9:57:26 AM"
>
if (nowTime is less than bedTime) then
>
set x to 1
>
else
>
set x to 2
>
end if
>
x --> 2
--
--> There are 10 kinds of people: those who understand binary, and those who don't <--
_______________________________________________
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.