Re: today and yesterday (finding them)
| From: | James Purvins | Date: | Wed, 31 Jan 2001 04:20:02 +0000 |
| Subject: | Re: today and yesterday (finding them) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-37414@lists.php.net to get a copy of this message | ||
Try checking out this hot link. It has quite a bit on sliding dates:
http://www.php.net/manual/en/function.getdate.php
----- Original Message -----
From: Chuck Barnett <xobyte@bellsouth.net>
To: PHP General List <php-general@lists.php.net>
Sent: Tuesday, January 30, 2001 8:10 PM
Subject: [PHP] today and yesterday (finding them)
> $today = getdate();
> $mon = $today[mon];
> $mday = $today[mday];
> $year = $today[year];
> $text=sprintf("%s-%s-%s", $year, $mon, $mday);
> $date=$text;
>
> This code gets me today in the form 0000-00-00
>
> What do I need to do to get yesterday in that form?
>
> Thanks,
> Chuck
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>