Thanx for the reply Selby, but it does not work for me, I explain you again,
I have a date stored in my BD eg. 1980-04-10,
I need a reminder when that date comes close eg. 2013-04-03, seven days before,
If I add a condition with addBetweenCondition like your code, the range goes from 2013-04-07 to 2013-04-14 and 1980-04-10 is not in that range by the year, I need to be a condition only for the day and month, clearer now?
You can keep day and month as you need, and try to use DateTime() class.
/* Fix first DateTime(); */
$dateOne = new DateTime();
$dateOne->setDate($year, $monthOne, $dayOne);
/* Fix second DateTime(); */
$dateTwo = new DateTime();
$dateTwo->setDate($year, $monthTwo, $dayTwo);
/* Note that $year must be the same as you need ... */
/* Get DateInterval object */
$interval = $dateTwo->diff(dateOne);
echo $interval->days; // ...