On Sat, Mar 1, 2008 at 8:42 AM, Brice <[EMAIL PROTECTED]> wrote:

> I like this way too but it will not work with a date before the first
> January 1901.
>
> Do you have another method?


the DateTime class uses an unsigned 64 bit integer to represent the unix
timestamp internally.  as a result it can handle such dates w/o a problem.

php > $dt1 = date_create('1856-02-27');
php > $dt2 = date_create('1855-12-03');
php > echo ($dt1->format('U') - $dt2->format('U')) / 86400;
86

-nathan

Reply via email to