<?php
$currentDate = date('m/d/Y');
$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 $currentDate;
echo "The date $currentDate is NOT within our date range\n";
}
01/15/2014The date 01/15/2014 is NOT within our date range
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
01/15/2014The date 01/15/2014 is NOT within our date range