// Returns TRUE if a year is a leap year// The year must be evenly divisible by 4// if the year can be evenly divisible by 100 is not a leap year// unless it is also evenly divisible by 400 then it is a leap year// https://en.wikipedia.org/wiki/Leap_yearpublic static function isLeapYear(int $year):bool { return (($year % 4 == 0) && (($year % 100 != 0) || ($year % 400 == 0)));}
posted by J. Ernesto Aneiros at 2:20 PM on Jan 18, 2021
"isLeapYear in PHP"
No comments yet. -