Re: Date / Time question

From: Date: Fri, 25 Aug 2000 20:29:56 +0000
Subject: Re: Date / Time question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-13723@lists.php.net to get a copy of this message
$today = mktime(); $the_day_to_test = mktime(0,0,0,25,8,2000); if ($the_day_to_test < $today) { /** DO something **/ /** the date entered is less than midnight today **/ } -jeremy brand _______________________________________________________________________ GnuPG Fingerprint: 9F5E 95E0 1CC2 E054 84EA 6099 8ACD 9DBA D2C0 5EA9 _ http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more __ On Fri, 25 Aug 2000, Paulson, Joseph V. "Jay" wrote: > Date: Fri, 25 Aug 2000 15:26:26 -0500 > From: "Paulson, Joseph V. \"Jay\"" <jay.paulson@viatel.com> > To: php-general@lists.php.net > Subject: [PHP] Date / Time question > > Hello everyone-- > I'm trying to validate a date to make sure that it isn't any date before the > current date (i.e. today's date is 08-25-2000 and I don't want any dates > before that date). Right now I have one function that checks to make sure > that the actual date is a valid date, however it doesn't check if the date > is before today's date. > > The application I am making is setting appointments and it's kind of dumb to > set an appointment for yesterday. I'm not too sure how exactly to go and > perform this check on the date so any help would be great! > > Thanks, > Jay Paulson > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#13723) next »