Calculate yeap year or print leap year using program
<?php
function isLeapYar($year){
return (date('L',mktime(0,0,0,1,1,$year)) == 1);
}
$year = 1950;
$toyear = 2050;
for($year = $year;$year < $toyear ; $year++){
if(isLeapYar($year)){
echo "Leap Year" . $year . "<br>";
}else{
echo "Leap Not Year " . $year . "<br>";
}
}
?>
Thanks you for commenting your questions. I will see question and respond you.