Re: Displaying dates

From: Date: Thu, 25 Apr 2002 12:09:50 +0000
Subject: Re: Displaying dates
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-94541@lists.php.net to get a copy of this message
craig@sitedesign.net (Craig) wrote: > How can i display a dynamic page showing last month and next month and the > month before > > eg > this moth is <?php echo date("j-M-Y H:i"); ?> > how do i add 1 to the month or -1 to the month? last month: date("j-M-Y H:i", mktime(0,0,0,date("m")-1, date("d"), date("Y"))); next month: date("j-M-Y H:i", mktime(0,0,0,date("m")+1, date("d"), date("Y"))); -- Henrik Hansen

« previous php.general (#94541) next »