Submitted by Kiran on Wed, 08/12/2009 - 12:38
Suppose I have a date coming in, "2009-01-01", what is the correct ways to decrement the date so that it will be just one day smaller.
»
- 1077 reads
Kiran - LAMP & SEO Architect, SEO SpecialistLAMP my de facto development standard. SEO my passion |
Suppose I have a date coming in, "2009-01-01", what is the correct ways to decrement the date so that it will be just one day smaller.
SEO Architect,SEO Specialist reflect my values.
By enduring black hat methods the SEO industry is setting itself up for washout and sleepwalking into oblivion.
Jobs in India
Here is another way out for decrementing days
$date = strtotime("-1 day", strtotime("2009-01-01"));
echo date("Y-m-d", $date);
//let's
$today="2009-01-01";
//then
$previousday=strftime("%Y-%m-%d", strtotime("$today -1 day"));
Post new comment