Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11847 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77829 invoked by uid 1010); 3 Aug 2004 03:19:29 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 77773 invoked from network); 3 Aug 2004 03:19:29 -0000 Received: from unknown (HELO mproxy.gmail.com) (64.233.170.200) by pb1.pair.com with SMTP; 3 Aug 2004 03:19:29 -0000 Received: by mproxy.gmail.com with SMTP id 75so131646rnk for ; Mon, 02 Aug 2004 20:19:25 -0700 (PDT) Received: by 10.38.81.54 with SMTP id e54mr247894rnb; Mon, 02 Aug 2004 20:19:25 -0700 (PDT) Message-ID: <1944df0040802201954d6ae26@mail.gmail.com> Date: Tue, 3 Aug 2004 13:19:25 +1000 To: internals@lists.php.net In-Reply-To: <1244657231.20040802230817@ionzoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <1697824207.20040802223614@ionzoft.com> <84F2B77E-E4F6-11D8-8E57-000D93359332@omniti.com> <1244657231.20040802230817@ionzoft.com> Subject: Re: [PHP-DEV] Date Support From: shiznatz@gmail.com (Robert Amos) On Mon, 2 Aug 2004 23:08:17 -0400, Jason Garber 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