ID:               42372
 Comment by:       diana dot woodhouse at unc dot edu
 Reported By:      [EMAIL PROTECTED]
 Status:           Assigned
 Bug Type:         Feature/Change Request
 Operating System: doesn't matter
 PHP Version:      5CVS-2007-08-22 (CVS)
 Assigned To:      derick
 New Comment:

does anyone have a workaround for the datetime difference
functionality? Simple subraction and addition of strototime values don't
work?


Previous Comments:
------------------------------------------------------------------------

[2007-08-22 09:15:35] [EMAIL PROTECTED]

Description:
------------
Would be nice if DateTime had some sort of differences functions.

Something that could get around the 2038 issue of this:

$diffTime = strtotime($endDateString) - strtotime($startDateString)

may be something like this:

$endDateString = new DateTime("@$X");

$diffTime = $endDateString->difference("@$Y");





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


-- 
Edit this bug report at http://bugs.php.net/?id=42372&edit=1

Reply via email to