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

From: Date: Mon, 28 Sep 2009 16:54:33 +0000
Subject: DateTime/DateInterval/DatePeriod Class PHP source for older than PHP 5.3.0
Groups: php.general 
Request: Send a blank email to php-general+get-298387@lists.php.net to get a copy of this message
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

« previous php.general (#298387) next »