note 39044 modified in function.checkdate by vrana

From: Date: Tue, 17 Aug 2004 14:54:07 +0000
Subject: note 39044 modified in function.checkdate by vrana
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-79731@lists.php.net to get a copy of this message
You can use this function to check if a year is leap or not: <?php if (checkdate(2,29,$current_year)) { echo "$current_year is a leap year !<br>\n"; } else { echo "$current_year is NOT a leap year !<br>\n"; } ?> It's straightforward... :) --was-- You can use this function to check if a year is leap or not: if (chkdate(2,29,$current_year)) { echo "$current_year is a leap year !<br>\n"; } else { echo "$current_year is NOT a leap year !<br>\n"; } It's straightforward... :) http://php.net/manual/en/function.checkdate.php

« previous php.notes (#79731) next »