[Phpwm] strtotime() date format

David Goodwin david at codepoets.co.uk
Tue Sep 18 15:51:13 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Greg Jones wrote:
> As long as you're not on windows, you can use strptime to parse a date
> for a given format, which you could reformat as something acceptable
> to strtotime. The way it parses is a little odd though (zero-indexed
> months, years since 1900)  and the formatting isn't that used by
> date(), so if your date-format is always going to be d/m/(y|Y) it's
> probably just easier to re-order it with string functions.

Ah, I'd not come across strptime() before. It looks useful, although it
would seem to be better if they merged such functionality with e.g.
date_parse()


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

iD8DBQFG7+XG/ISo3RF5V6YRAqJfAJwIJDNvbtnbnTwY47Ds+SCbKhOk5QCg0j6W
pTH457Mdp+ZGY/3SBdfBzMI=
=uKY/
-----END PGP SIGNATURE-----



More information about the Phpwm mailing list