Re: A creepy story about dates. How to prevent it?

Greg Sabino Mullane <greg@turnstep.com>

From: greg@turnstep.com
To: pgsql-general@postgresql.org
Date: 2003-06-19T15:14:06Z
Lists: pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> But when you are dealing with hand-entered input, you *do not know* what
> the user meant by input such as '01/03/2003'.  You may think you know,
> but you're just fooling yourself.

I agree with this, but the actual test case someone posted was:

2003-13-03
2003-03-13

Parsing these both as the same date just seems fundamentally wrong in my 
opinion. Besides, although MM-DD-YYYY and DD-MM-YYYY are both rather 
common, YYYY-MM-DD is much more common than YYYY-DD-MM. I really think 
it should throw an error if it does not fit into YYYY-MM-DD.

- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200306191110

-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html

iD8DBQE+8dMSvJuQZxSWSsgRAiaYAKDrZMWBy7pv81BjCeSzMdbyTsu3eQCg9exM
vXj4GEQRhckbz2ygBmkX8z4=
=WtaY
-----END PGP SIGNATURE-----