- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$currentDate = date('01/15/14');
$start = strtotime('01-12-14');
$end = strtotime('02-12-14');
$timestamp = strtotime($currentDate);
if($timestamp >= $start && $timestamp <= $end) {
echo $currentDate;
echo "The date $currentDate is within our date range\n";
} else {
echo " timestamp is $timestamp";
echo "start is $start";
echo "end is $end ";
echo "The date $currentDate is NOT within our date range\n";
}