JRS: In article <df*********@news3.newsguy.com>, dated Tue, 30 Aug 2005
21:57:26, seen in news:comp.lang.javascript, Jim Davis
<ne********@vboston.com> posted :
I was able to address the problem with a coupla of RegExp's in the end.
Please do not use slang. A substantial portion of this newsgroup are
not native users of English or American, and may have only learned the
proper forms of English.
The purpose is not to represent a full 8601 parser (I'll leave that to much
bigger brains) - only to parse those (6) formats specified by the WC3 note.
Processing data in various ways until some form which might be correct
is tried is a very American thing to do, and usually leads to error in
the end. In a non-ISO context, success with Christmas Day does not
justify presumption of success with Guy Fawkes' Day.
I really haven't the faintest idea what you're talking about here... ;^)
Indeed - perhaps you are not well-informed about the history of pre-
colonial times.
This is not a "fishing expedition" but rather a situation where arbitrary
dates may be sent. The six formats required cover a range of progressive
specificity and so the parser should understand them all.
You still have not given those formats here.
Please read the newsgroup FAQ before asking questions. See below.
The FAQ doesn't seem to inform this question... is there something specific
in it you're suggesting I missed? Or do you just say this a lot? ;^)
Well, you could try searching it for 'date' 'dates' 'time' or 'times'.
After all, it was you, I think, who did not want to re-invent the wheel.
You could also think more deeply about "See below".
Validating the values of the digits of a date by RegExp is a waste of
effort, since it can be done so much more easily by other means (and, as
has been shown by posters here in the past, it can be done rapidly by
deploying concentrated cunning). Time field value validation by RegExp
in not unreasonable, but not necessary either.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.