Since you're not concerned about "Year",
are you going to always assume it's between the first date and second date,
not the second and first date? There is a difference.
So if you have this:
11-19 ... 02-20 (you mean 11-19-2011 and 02-20-2012)
and not (11-19-2011 and 02-20-2011)?
If you're always assuming the 2nd date is further in the future than the first date,
you can use UNIX timestamp. Otherwise, the script would never work ... not knowing
which direction you're going. Do you see what I mean?
My test ... upload this and see what it does ...
PHP Code:
<?php
// some test values.
// in this example, the 2nd date is assumed to be 2012, not 2011.
$date1="11-17";
$date2="02-15";
// the UNIX timestamp right now.
$now=time();
// determine which year to use.
if(strtotime(date("Y")."-".$date1) < strtotime(date("Y")."-".$date2)){
$date1=strtotime(date("Y")."-".$date1);
$date2=strtotime(date("Y")."-".$date2);
}
else{
$date1=strtotime(date("Y")."-".$date1);
$date2=strtotime((date("Y")+1)."-".$date2);
}
if($now >= $date1 && $now <= $date2){
echo "Within range";
}
else{
echo "Outside of range";
}
?>
.