Re: Dates and Date()
| From: | Rasmus Lerdorf | Date: | Mon, 29 Jul 2002 14:48:59 +0000 |
| Subject: | Re: Dates and Date() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-110181@lists.php.net to get a copy of this message | ||
$ts = strtotime("-10 days");
On Mon, 29 Jul 2002, Christopher J. Crane wrote:
> I believethisto be one way to find out yesterday's date:
> $tomorrow = mktime (0,0,0,date("m") ,date("d")-1,date("Y"));
>
> However, I would like to have a snippet of code to tell me how to get the
> date of today - 10 days ago.
>
> if today is jul 29, 2002, how do I get the date funtion to tell me 10 days
> ago. with jul 29, 2002 as the date it would be easy, just subtract 10 from
> 29, but what happens if the date was jul 2, 2002. How do I get the correct
> date returned????
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>