I need to determine if a date (month and day) is between two other month/days.
I\'ve attached an image to this post that describes what I\'m trying to do. Basically
//must be 2 digit month, then 2 digit day, like mm-dd
$low = '03-15';
$high = '11-22';
$date = '02-01';
$isBetween = $date >= $low && $date <= $high;
var_dump($isBetween);
I'm making use of lexicographic ordering, which is how php compares strings. The key point is to put the largest units on the left(months), and make sure to left-pad each numeric segment to the same length, using zeros to pad.
If you don't yet have your dates as strings formatted like this, you can use date('m-d', $timestamp) function to achieve that.