I'm making a calendar using PHP and JS and it worked perfectly between the year 1902 until 2037, because from 2038 the function to get the day of the week in PHP returns an incorrect value. Is there any specific reason for this?
Follow the code used in the first image to where it still works and in the second image where it starts to get the wrong value.
In the image where you have the "|" on the left side is the day of the week of the month and on the right side the return of the function below.
function getDayWeek($date){
return date("w", strtotime($date));
}