In a message regarding Re: parseDate replacement dated Fri, 04 May 2007
11:10:42 +0200, Maximilian Tyrtania said that ...
> The problem with the code given is that it fails to tell me that November
> 34th 2006 ('34.11.2006') is an invalid date. RB's parse date realizes this,
> and duly returns false whereas Steves method tries to convince me that i
> actually meant December 4th 2006. I don't think that it should do that.
Neither do I! Thanks for pointing that out.
> I think a possible approach would be to change the given datestring into
> something that we know RB's parse date can digest, and then just hand the
> modified parameter over to RB's parse date and return its result.
As I'm not confident I understand parseDate's behaviour under all
circumstances on all locales and platforms, I've decided against risking
that.
I've posted corrected (I hope) code at
<http://rb.sgarman.net/validDate.php>
--
Steve Garman
Using REALbasic Professional on Windows XP Pro
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>