John Taylor-Johnston
2013-10-20 02:44:43 UTC
I have date strings in my mysql db. yyyy-mm-dd.
I want to parse to see if the date is greater than november 2011 and
less than december 2012.
Is this the right approach? How bad is my syntax?
|function dates_range($todaynow)
{ |
|$date1=strtotime("2011-11-01");
$date2=strtotime("2012-12-31");
if (|||($|||||todaynow |>= $date1) and |||||($|||||||todaynow|
<= $date2)||)
|| {
|| # do something
|||| }
}
|||
I want to parse to see if the date is greater than november 2011 and
less than december 2012.
Is this the right approach? How bad is my syntax?
|function dates_range($todaynow)
{ |
|$date1=strtotime("2011-11-01");
$date2=strtotime("2012-12-31");
if (|||($|||||todaynow |>= $date1) and |||||($|||||||todaynow|
<= $date2)||)
|| {
|| # do something
|||| }
}
|||