Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!munnari.oz.au!basser!metro!ipso!runxtsa!sce From: sce@runxtsa.runx.oz.au (Simon Evans) Newsgroups: comp.sys.mac.programmer Subject: String2Time (in Script Manager) woes Message-ID: <483@runxtsa.runx.oz.au> Date: 11 Dec 89 05:46:12 GMT Reply-To: sce@runx.oz (Simon Evans) Organization: RUNX Unix Timeshare. Sydney, Australia. Lines: 35 I have been unable to get the Script Manager (v$020E -- 2.14 in System 6.0.2) to correctly parse the time and date "09:13 5/23/89", for example. The problem is that String2Time dutifully follows the syntax given in the documentation, time := number [tSep number [tSep number]] [mornStr | eveStr | timeSuff] tSep := timeSep | sep sep := interprets the space as a separator, and swallows the 5 as the seconds field of the time. Then all that is left for String2Date is "/23/89" which it understandably fails to make much sense of. (String2Time will in fact parse "09:13 This is extraneous 54 trombones" identically, adding extraneousStrings to the result code -- ie it gives a time of 09:13:54). The main question -- Is there any way to stop String2Time hunting for seconds, or do I have to insist that users either include seconds or write the date as "5/23/89 09:13"?? Am I missing something really obvious?? If this isn't a bug in the Script Manager, it is at least very annoying. If I have to code around this problem, the whole point of the Script Manager/ International Utilities is lost. The routine is documented as being semantically driven, and smarter than the pure syntax would indicate. Perhaps it should be smart enough to deal with this a little better?? Simon Evans. AppleLink: AUST0134 (JAM Software), or followup to news.