The date function can be used to return the string formatted based on the format specified by providing the integer timestamp or the current time if no timestamp is given
The timestamp is optional and defaults to the value of time().
Example
if(date('j', $timestamp) === '1') echo "It is the first day of the month today\n"; if(date('D', $timestamp) === 'Mon') echo "It is Monday today\n";
Output
This will produce the following output −
It is the first day of the month today