Re: date problem

From: Date: Thu, 03 Jan 2013 22:00:15 +0000
Subject: Re: date problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-320019@lists.php.net to get a copy of this message
1/3/2012 is in fact less then 9/16/2012..... On Thu, Jan 3, 2013 at 3:57 PM, Marc Fromm <Marc.Fromm@wwu.edu> wrote: > I am comparing to dates. > > define('WSOFFBEGIN','09/16/2012'); > $jes = 01/03/2012; > > if ( date("m/d/Y", strtotime($jes)) < date("m/d/Y", > strtotime(WSOFFBEGIN)) > ) > { > $error = " MUST begin after " . WSOFFBEGIN . "\n"; > } > > I cannot figure out why the $error is being assigned inside the if > statement, since the statement should be false. 01/03/2012 is not less than > 09/16/2012. > > Marc >

« previous php.general (#320019) next »