Date handling

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

 



Hello,

I would like to find out the 'official' way to handle dates in PHP.  I am 
aware of the limits on a Unix timestamp, but I am writing a financial 
application that needs to deal with dates both before 1970 and after 2038 
and of course have run into problems when trying to format those dates using 
the date() and strftime() functions.  This of course then also impacts 
Smarty as Smarty's date_format modifier is just a wrapper around strftime().

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.

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?

Thanks,
Ryan

-- 
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