Blog

PHP 5 tips: DateTime class

2007-10-07 11:56:01 by Martynas Jusevičius

PHP 5.2 introduced new DateTime and DateTimeZone classes, which obsolete the datetime functions. They offer a convenient way to store dates and time as objects, instead of strings or integers. Classes also have a better time zone support as well as support for dates outside of the Unix epoch.
But the API, while useful, is rather over-simplified and under-documentented. Here is a good introduction to the API with lots of examples: Looking at PHP5’s DateTime and DateTimeZone by Laughing Meme.

Digg Digg this! del.icio.us del.icio.us!

Comments (2)

2007-10-07 14:35:46 by Antony Dovgal

If you think it's poorly documented (I tend to agree with this), please contact phpdoc@lists.php.net and give a hand to the documentation team, that's always appreciated.

devblog

2007-10-24 22:45:45 by sf

That's cool, I didn't know about it.

New comment






No HTML allowed.