Re: Comparing Dates
| From: | Alex Shi | Date: | Sun, 09 Dec 2001 03:31:11 +0000 |
| Subject: | Re: Comparing Dates | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-77140@lists.php.net to get a copy of this message | ||
Absolutely you are doing in the right way:) But pls make sure that
string comparison is from left to right. For example, "16" is larger
than "15-12-01".
Alex
----- Original Message -----
From: <natesanden@hotmail.com>
To: <php-general@lists.php.net>
Sent: Saturday, December 08, 2001 8:16 PM
Subject: [PHP] Comparing Dates
I'm trying to do a check on a date, to see if it's after the current date,
so basically i'm doing an
if(date("d-m-y")>"15-12-01") { do something }
I know that's obviously not the right way to do it, but can someone help me
out?