[Phpwm] strtotime() date format
David Goodwin
david at codepoets.co.uk
Wed Sep 19 09:26:24 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alex Mace wrote:
> I think that is the issue - that you have some data that you want to convert
> to a Unix timestamp, but the function that does it (strtotime) requires it
> in the US date format. So a UK user will input it in dd/mm/yyyy but the
> function wants mm/dd/yyyy. Personally, I usually give the user drop downs to
> select a date to try and prevent some dodgy dates getting in and then store
> it in yyyy-mm-dd as strtotime will take that as well, it's easy to store in
> MySQL and you can use it to order by date...
>
>
I agree; yyyy/mm/dd is the easiest approach; unfortunately some
people/customers prefer dd/mm/yyyy...
David.
- --
David Goodwin
[ david at codepoets dot co dot uk ]
[ http://www.codepoets.co.uk ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFG8N0T/ISo3RF5V6YRAl3aAJ9c4BsUbpq5zxThyq7F9i7MSWiVdACgkzUP
UFp7XF25pi09/Y265jKj6Xg=
=HEiB
-----END PGP SIGNATURE-----
More information about the Phpwm
mailing list