Please confirm if this is a date bug
Len Morgan
len-morgan at crcom.net
Mon Jun 4 13:20:03 EDT 2007
Unfortunately, this doesn't work for the same reason. If I use Sarah's library, with "05/19/1956", the function yearToNum() returns 2007 (not 1956) because it substitutes the current date if it thinks I've passed an invalid date.
Len Morgan
Sarah Riechelt has done quite a bit of work on this area.
http://troz.net/Rev/libraries.php
DateTime.rev
A collection of date and time functions for extracting certain bits of date
information and for performing date & time conversions and calculations.
Updated to include new functions for ISO week number, Julian dates, Easter,
relative date calculations etc. Thanks to Eric Chatonet and Mark Weider for
their contributions to this library.
Jim Ault
Las Vegas
On 6/4/07 9:06 AM, "Len Morgan" <len-morgan at crcom.net> wrote:
> > I've been trying to validate a user date entry and I'm not getting what
> > I think the correct result should be:
> >
> > in the message box (for simplicity's sake):
> >
> > put "05/19/1956" is a date
> > false
> >
> > This is on Windows XP with 2.8.1. This DOES work (i.e., returns true)
> > on a Mac.
> >
> > If the year is 1970 or higher, it will return true (as it should).
> >
> > This seems like it might be related to bug 4911 which reported that if
> > you passed "" to is a date, it returned "12/31/1969" instead of "invalid
> > date"
> >
> > Is there a work-around?
> >
> > Len Morgan
More information about the use-livecode
mailing list