Re: Adding Dates...
| From: | Ignatius Reilly | Date: | Fri, 09 May 2003 08:01:39 +0000 |
| Subject: | Re: Adding Dates... | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19821@lists.php.net to get a copy of this message | ||
Easy to do if PHP has access to a MySQL server:
SELECT "2003-05-09" + INTERVAL 1 YEAR
or SELECT ( "2003-05-09" + INTERVAL 1 YEAR ) - INTERVAL 1 DAY
(depending on your purpose)
Otherwise you may use the PEAR date package. There is a function
isLeapYear().
HTH
Ignatius
____________________________________________
----- Original Message -----
From: "Guru P Chaturvedi" <bangboy2k2@hotmail.com>
To: <php-windows@lists.php.net>
Sent: Friday, May 09, 2003 9:33 AM
Subject: [PHP-WIN] Adding Dates...
> Hi there,
> i want to add dates to get future dates. For example i want the membership
> of a particular person to end after 1 year from his registration date.
>
> Say the person registers on 29 Feb xxxx and his registration should expire
> after an year but then there won't be 29 Feb next year. So this
complicates
> the issue. Is there any cool built-in way to do it?
>
> with Warm Regards,
> Guru.
> ---------------------------------------
> Phone: (+91)9845290270
> URL: www.gangarasa.com
> Yahoo IM: guru4vedi
> MSN: guru4vedi@gangarasa.com
> ---------------------------------------
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>