How to compare dates in PHP This is great article about how you can use DateTime class for date comparisons: https://web-techno.net/php-datetime-create-compare-format/