<?php
$months = array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
$yes = 0;
for ($i = 0; $i < 12; ++$i) {
$result = date('m.d.y', strtotime($months[$i]));
if (((int)substr($result, 2)-1) != [$i]) {
$correct = "no";
} else {
$correct = "yes";
$yes++;
}
echo $correct . " - " . $result . "\n";
}
echo "\n" . $yes . " / 12 correct months.";
?>
preferences:
48.55 ms | 402 KiB | 5 Q