W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2004

[whatwg] Suggested changes to Web Forms 2.0, 2004-07-01 working

From: Dean Edwards <dean@edwards.name>
Date: Fri, 09 Jul 2004 15:26:51 +0100
Message-ID: <40EEAB2B.1050308@edwards.name>
> Matthew Raymond wrote
>>   Try searching on "javascript isdate".
Jim Ley wrote:
> nope, still not found one, the one you seem to be talking about is the
> constrained format version, remember I do not believe we can do
> constrained format in legacy UA's, simply because we cannot provide
> the hint on how to do it without confusing WF2 clients.  Therefore we
> have to be able to accept any random content.

i'm looking at an old date validation function of mine now. it handles 
international date formats and it's about 20 lines of code. the function 
was written to a client's specific requirements but it should not be too 
difficult to make sure that it is generic enough for WF2. if size is an 
issue (and i think it should be for a plugin such as this) then there 
are ways to compress javascript code. i just run my "isDate" function 
through my own javascript packer and it came out at about 600 bytes.

as an aside, javascript is pretty good at validating dates. try this 
alert(Date.parse("3 Aug 1999"));
cool huh?

Received on Friday, 9 July 2004 07:26:51 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:35 UTC