Voting

: max(six, four)?
(Example: nine)

The Note You're Voting On

jawzx01 at gmail dot com
13 years ago
As previously mentioned, to do a negative DateInterval object, you'd code:

<?php
$date1
= new DateTime();
$eightynine_days_ago = new DateInterval( "P89D" );
$eightynine_days_ago->invert = 1; //Make it negative.
$date1->add( $eightynine_days_ago );
?>

and then $date1 is now 89 days in the past.

<< Back to user notes page

To Top