Weird date "string" glitch!
Weird date "string" glitch!
- Subject: Weird date "string" glitch!
- From: Loren Ryter <email@hidden>
- Date: Fri, 02 Dec 2005 15:17:12 -0500
- Thread-topic: Weird date "string" glitch!
Can anyone tell me why applescript seems to convert some strings to dates
for no apparent reason?
I want to try to convert a string to a date and if it fails do something
else, as in:
Try
Set d to date "string"
On error
Set d to "cannot make a date out of the string"
End try
But I'm finding that some strings just turn into a random date:
-- "Steve's with the apostrophe"
--set d to date "Security Now! Episode 16: Your Questions, Steve's Answers"
set d to date "Thursday, September 1, 2005 4:00:00 PM"
--- "Steves" without the apostrophe
--set d to date "Security Now! Episode 16: Your Questions, Steves Answers"
set d to date "Friday, December 2, 2005 4:00:00 PM"
-- this gets the expected result when attempting to compile:
-- (Invalid date and time Security Now.)
--set d to date "Security Now"
Can anyone tell me what's going on with that?
_______________________________________________
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