This tutorial will aid in simple date manipulations using php.
Tomorrow is 09/05/10 60 days away is 11/03/10 3 months away is 12/04/10 3 years away is 09/04/13
Here is the code needed to display the date changes seen above.
$tomorrow = mktime(0, 0, 0, date("m"), date("d")+1, date("y"));
echo "Tomorrow is ".date("m/d/y", $tomorrow)."<br>";
$sixty = mktime(0, 0, 0, date("m"), date("d")+60, date("y"));
echo "60 days away is ".date("m/d/y", $sixty)."<br>";
$threemonths = mktime(0, 0, 0, date("m")+3, date("d"), date("y"));
echo "3 months away is ".date("m/d/y", $threemonths)."<br>";
$threeyears = mktime(0, 0, 0, date("m"), date("d"), date("y")+3);
echo "3 years away is ".date("m/d/y", $threeyears)."<br>";
|