Re: Requiring a date be entered as mm/dd/yy on a form field.
- From: Tim Harig <usernet@xxxxxxxxxx>
- Date: Mon, 15 Jun 2009 15:25:23 GMT
On 2009-06-15, Dr J R Stockton <reply0925@xxxxxxxxxxxxxxxxxx> wrote:
In microsoft.public.scripting.jscript message <d6-dnbQX5JdW0ajXnZ2dnUVZ_
r9i4p2d@xxxxxxxxxxxxx>, Sun, 14 Jun 2009 21:17:30, Conrad Lender
<crlender@xxxxxxxxx> posted:
On 14/06/09 18:44, Dr J R Stockton wrote:It can verify that an mm/dd/yy string is compatible with the Gregorian
2) We've already established that client-side checking is not enough to
completely validate a date entered in this format.
Calendar, and if appropriate whether it is in an acceptable range. It's
much harder to determine whether it is the date that the user ought to
have intended to put.
The question at hand it not whether the user entered what they wanted but
whether they entered it in the right format. A regular expression cannot
confirm that for dates within the first twelve days of a month.
I have read of a case where, in August of year YY, an American ran into
difficulties with a European visa stamped as expiring 10/06/YY - or
something like that. I expect that nowadays YYYY-MM-DD is used for
European numeric dates in an international context.
There are still a huge number of dd/mm/yy dates out there and these types
of errors are extremely common. People who do not have to work with other
cultures often have difficulty even comprehending internationalizaion
issues. Programmers without intercultural background have little ability
to test the assumptions of their code against the range of
internationalized possiblities because their assumptions are still based on
their experiences.
For random input. For a common case of a single digit being off by one,For the case where the person entering the date is interested in gettingThat's an interesting idea for dates in the near future or past, but not
it right and is not a mere key-puncher, there is one further thing that
can easily be done and will cause some input errors to be corrected :
after the date has been entered (i.e. onChange), cause the day-of-week
to appear next to it. If the user is not a mere copyist but a generator
of the data, he will often know the day of week of the intended date.
very useful for anything else (birth dates, invoice dates, etc). It also
has a 14% false positive rate.
except that it can only tell months 2 & 3 in leap years. I think it is
trustworthy. It will also do well on transposing an adjacent digit
pair.
Your method is no doubt great for confirming typos type errors and I would
encourage people to use it for that reason alone(where applicable).
I would not use it as my only means of verification of the entered are
available which are clearer, do not require active user action, do not
require javascript where it may not be available, and are universally
applicable to all dates.
.
- Follow-Ups:
- Re: Requiring a date be entered as mm/dd/yy on a form field.
- From: Dr J R Stockton
- Re: Requiring a date be entered as mm/dd/yy on a form field.
- References:
- Requiring a date be entered as mm/dd/yy on a form field.
- From: Brave
- Re: Requiring a date be entered as mm/dd/yy on a form field.
- From: Conrad Lender
- Re: Requiring a date be entered as mm/dd/yy on a form field.
- From: Dr J R Stockton
- Re: Requiring a date be entered as mm/dd/yy on a form field.
- From: Conrad Lender
- Re: Requiring a date be entered as mm/dd/yy on a form field.
- From: Dr J R Stockton
- Re: Requiring a date be entered as mm/dd/yy on a form field.
- From: Conrad Lender
- Re: Requiring a date be entered as mm/dd/yy on a form field.
- From: Dr J R Stockton
- Requiring a date be entered as mm/dd/yy on a form field.
- Prev by Date: Re: Requiring a date be entered as mm/dd/yy on a form field.
- Next by Date: Re: Requiring a date be entered as mm/dd/yy on a form field.
- Previous by thread: Re: Requiring a date be entered as mm/dd/yy on a form field.
- Next by thread: Re: Requiring a date be entered as mm/dd/yy on a form field.
- Index(es):
Relevant Pages
|