Offer validity with date() function

ogoa

New Member
I have created a function that will determine if an "offer" is currently valid. Each offer has a start and end date stored in a database and I use the date() function to figure if its valid. However, I have a problem since the following scenario is not returning "TRUE". I believe it should return "TRUE". What am I not getting?\[code\]$start = 2010-9-18 $stop = 2010-10-10// Current date is 2010-9-19function is_active($start, $stop) {$now = date("Y-n-d");if($now >= $start && $now <= $stop) {return true; }}?>\[/code\]Thanks for helping out!
 
Back
Top