First of all, here is my code:
<?php
$year = 1006;
while ($year <= 1996)
{
$date = '1/26/' . $year;
if (date('l', strtotime($date)) == 'Monday')
{
echo $date . PHP_EOL;
}
$year += 10;
}
?>
This is supposed to output the January 26s between 1000 and 1999 where the year ends with a 6 and the date falls on a Monday. Here is the output:
1/26/1006
1/26/1096
1/26/1136
1/26/1186
1/26/1226
1/26/1316
1/26/1366
1/26/1406
1/26/1496
1/26/1536
1/26/1586
1/26/1626
1/26/1756
1/26/1846
1/26/1976
All seems well. However, when I look at few of these years on timeanddate.com, the weekdays do not seem to have anything in common:
1/26/1006 falls on a Saturday
1/26/1406 falls on a Tuesday
1/26/1756 does fall on a Monday
What's going on here?