Re: Date Support
| From: | Robert Amos | Date: | Tue, 03 Aug 2004 03:19:25 +0000 |
| Subject: | Re: Date Support | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-11847@lists.php.net to get a copy of this message | ||
On Mon, 2 Aug 2004 23:08:17 -0400, Jason Garber <jason@ionzoft.com> wrote:
> Hello George,
>
> Because they both operate on an integer timestamp...
>
> two things:
> SELECT CURDATE() + INTERVAL 7 MONTH;
> echo strtotime("7/12/1900");
>
> Timestamps are fine for things that are happening within a very limited
> range of dates. How do you add a given number of months to a date?
> how do you get the day of week for a given date? These are the
> types of functions that I am thinking of.
>
echo strtotime("now +7 months");
echo date('l', strtotime('2004-10-02')); || echo strftime('%A',
strtotime('2004-10-02')); (latter supports locales)
http://php.net/strtotime
http://php.net/strftime
http://www.gnu.org/software/tar/manual/html_chapter/tar_7.html
-bok