Re: Date handling

From: Date: Mon, 15 Nov 2004 21:40:04 +0000
Subject: Re: Date handling
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-202099@lists.php.net to get a copy of this message
On Nov 15, 2004, at 2:05 PM, Ryan wrote:
Hello, I would like to find out the 'official' way to handle dates in PHP.
There are many paths, choose the one best for you. :-)
I am looking at the PEAR Date module and that seems to resolve these issues, but I would like to know if that is the standard/official way to handle dates in PHP applications as in my application, I would like to have one handler for dates, rather than separate code for dates within the Unix timestamp range and for dates outside - so if I switch to PEAR Date, I will use it everywhere in my code since I cannot take any chance of using date() or strftime() and possibly getting invalid data.
I don't believe there is a standard way to do anything in php. I'd say if you find that it works for you, use it. I've used the PEAR Date package myself and it has worked in every case that I needed it.
Additionally, are there any plans to make an official PHP date extension that handles dates outside a Unix timestamp range as something built into the language itself rather than as a '3rd party extension' which the PEAR Date module appears to be since it's not in the core PHP language?
I believe I've heard rumors of this for php5.1. You might want to dig through the php-internals archive to find out for sure.
Thanks, Ryan
You're welcome, ryan

« previous php.general (#202099) next »