Hi there!
Please help me with this.
I'm making some kind of auction system. My problem is comparing date values. When user create new auction he/she has to give duration for the auction. (for example 20 days)
I live in Finland and our time format is following:
If now is 18 May 2001,
we use format 18.05.2001. (day.month.year)
So I put value 07.06.2001 to $enddate field.
When the enddate comes I update the auction and set auction status to 0 (closed)
Here comes the problem:
How can I compare
$enddate = date( "d.m.Y", mktime(date("H"),date("i"),date("s"),date("m"),date("d")+20,date("Y")) ); (= 07.06.2001) AND
$current_date = (date ("d.m.Y "));
(= 18.5.2001)
Code below doesn't work:
if($enddate >= $current_date){
print "Auction goes on...";
}
else print "Update auction status";
How can I compare those dates? Please help.