On 30-Apr-07, at 11:37 AM, Steve Garman wrote:

> I have a function I intend to use when parseDate returns false or  
> produces
> a date too far in the past.
>
> The idea is that this should work in as many Gregorian calendar
> circumstances as possible.
>
> So far it is working on all the machines where I have tested it but  
> I am
> sure that I have missed all sorts of possible circumstances.
>
> It would be a great help to me if anyone willing would try the  
> function on
> as many platforms/locales as possible and let me know any problems,
> suggested improvements, etc.
>
> I have posted the code at
> <http://rb.sgarman.net/validDate.php>
>
> Thanks for any help.

You can figure out the specific separator in the date

Create a date (as you do) , get a short date and remove all numerics

What's left is the separators

Not sure if a static is the best as a person could change the date  
separators while the program is running and this would miss that but  
otherwise this seems to work pretty well even when I change my date  
format to mm;yy;dd

I have a couple small changes I made if you're interested
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to