Re: Comparing Dates

From: Date: Mon, 10 Dec 2001 14:45:44 +0000
Subject: Re: Comparing Dates
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-77411@lists.php.net to get a copy of this message
$timestamp = time(); $yourdate="12:35:20:7:4:2001"; // 12:35:07 July 4 2001 $yd_expl = explode(':',$yourdate); if (mktime(0,0,0,strftime('%m',$timestamp),strftime('%d',$timestamp),strftime('%Y',$timestamp) < mktime($yd_expl [0],$yd_expl[1],$yd_expl[2],$yd_expl[3],$yd_expl[4],$yd_expl[5]) ){ // do you have to do } HTH Regards, Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS ----- Original Message ----- From: <natesanden@hotmail.com> To: <php-general@lists.php.net> Sent: Sunday, December 09, 2001 3:16 AM 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?

« previous php.general (#77411) next »