DateTime/DateInterval/DatePeriod Class PHP source for older than PHP 5.3.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So I'm jealous, the functionality in the DateTime class, DateInterval class and DatePeriod class are exactly what I need in my current application, but my Host is on PHP 5.2.10, which has a partial DateTime class, but not the others. I'd like to add a:

--------------------------------------

if (!class_exists('DateTime')) {

/* definition of DateTime */

}
if (!class_exists('DateInterval')) {

/* definition of DateInterval */

}
if (!class_exists('DatePeriod')) {

/* definition of DatePeriod */

}

----------------------------------

That way when my Hosting company gets its act together I won't break any code.

Are there any resources for me? I'm willing to dig, and even downloaded the source to 5.3.0, only to find that the php class seems to be "faked" in the C code for /ext/date/date.[ch]

Which doesn't help me unless I compile it on my own. I'm looking for a lighter weight solution, just the php code that's equivalent to the classes ... doesn't it exist somewhere? A basis that Derick Rethans used to make it?

Jeff

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux