Created
April 4, 2012 14:23
-
-
Save cvergne/2301589 to your computer and use it in GitHub Desktop.
Check if date is in defined date range
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$startDate = strtotime('2012-04-01'); | |
$endDate = strtotime('2012-04-30'); | |
$searchDate = strtotime('2012-04-18'); | |
if ($searchDate >= $startDate && $searchDate <= $endDate) { | |
echo 'Notre date recherchée est bien dans la plage spécifiée.'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment