PHP makes date math simple with DateTime and DateInterval.
DateTime
DateInterval
PHP’s DateTime objects and comparison operators make this simple.
In PHP, the date() function formats a timestamp to a more readable string.
date()
PHP’s built-in date() function is the most direct way to get the current date.
PHP’s built-in DateTime class provides a powerful set of functions for parsing and working with dates.