Playing With Dates?
Posted: Sat Nov 27, 2010 8:55 am
Hi,
Just wondering if there is a standard PHP function to acheive the following, or do I need to write a lengthy function myself?
Just wondering if there is a standard PHP function to acheive the following, or do I need to write a lengthy function myself?
Code: Select all
<?php
$datebefore = "2010-11-28";
$dateafter = imaginaryfunction($datebefore, 7); //Adds 7 days to the date
echo $dateafter; //Output: 2010-12-05
?>