echo date("Y/m/d", strtotime("third monday of february 2037")); //2037/02/16
echo date("Y/m/d", strtotime("third monday of february 2038")); //1970/01/01
The PHP version is 5.6.3. Thanks
echo date("Y/m/d", strtotime("third monday of february 2037")); //2037/02/16
echo date("Y/m/d", strtotime("third monday of february 2038")); //1970/01/01
The PHP version is 5.6.3. Thanks
32-bit signed integer timestamps have a limited range
Quoting from the PHP docs
The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 UTC to Tue, 19 Jan 2038 03:14:07 UTC. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer.)
This is why DateTime objects are a better way to handle dates and times
From PHP doc,
Note:
The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 UTC to Tue, 19 Jan 2038 03:14:07 UTC. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer.)
You can try this way using DateTime class
$date = new DateTime('third monday of february 2038');
echo $date->format('Y/m/d');