note 46561 modified in function.checkdate by curt

From: Date: Sat, 16 Oct 2004 05:08:10 +0000
Subject: note 46561 modified in function.checkdate by curt
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-78645@lists.php.net to get a copy of this message
each century is *not* a leap year, while each full millennium *is* that. So compute leap year like this: $leap_year = (($year % 4 == 0) && ($year % 100 != 0) || ($year % 1000 == 0)) --was-- Just a correction: each century is *not* a leap year, while each full millennium *is* that. So you compute it like this: $leap_year = (($year % 4 == 0) && ($year % 100 != 0) || ($year % 1000 == 0)) http://php.net/manual/en/function.checkdate.php

« previous php.notes (#78645) next »