Re: Getting and formating todays date...
| From: | James Du Russel | Date: | Fri, 09 Jun 2000 18:37:59 +0000 |
| Subject: | Re: Getting and formating todays date... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-1408@lists.php.net to get a copy of this message | ||
You can replace the first set of calls with just
$todaysdate = date('Ymd');
The second, since you're incrementing the month, should be done the way
you've shown...
$thirtydays = date('Ymd',
mktime(0,0,0,date('m')+1,date('d'),date('Y')));
James
Philip Hallstrom wrote:
>
> You just need to "wrap" another date() function around it...
> So, before your echos do:
> $todaysdate = date("Ymd", $todaysdate);
> $thirtydays = date("Ymd", $thirtydays);
<snip>
> >$todaysdate = mktime (0,0,0,date("m") ,date("d")
> >,date("Y"));
> >$thirtydays = mktime (0,0,0,date("m")+1,date("d")
> >,date("Y"));