Re: Comparing dates in text files

From: Date: Tue, 27 Jun 2000 20:49:55 +0000
Subject: Re: Comparing dates in text files
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-3447@lists.php.net to get a copy of this message
At 12:03 27.06.00 -0400, you wrote:
Hello,
    I have a bunch of text files that have the date on the second line. I
also have a set of search criteria... a start month/day/year and an end month/day/year. How can I tell if the date of that text file lies between my two search dates? Is there any function that can compare dates besides checkdate (I don't think that will work here...?)? I tried comparing the actual file date but the files can be edited so that date changes. I'm really stuck on this one... any help would be great! Thanks, -- C. Marcera read `till you reach the sentence, isolate the strings you need
using substr(....)(see manual) the two ways isolate mm/dd/yy a) using also substr or b) using explode(...) (see manual) then use date mktime(0,0,0,mont,day,year) to get a unix timestamp you could also use this function to have your start and end-date made, then use simple if actual < enddate || actual > start or something like this yap it´s a way, maybe someone has a starighter one Oliver

« previous php.general (#3447) next »