summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2004-06-28 14:35:41 +0000
committerDerick Rethans <derick@php.net>2004-06-28 14:35:41 +0000
commitf864a93b00d36bd880ed387f515772e1d023313c (patch)
treeda8736008941ea7ae171d03794b1e1cbc9575b69
parent1556fa266508ef29f70cba64052126472f6d89e9 (diff)
downloadphp-git-f864a93b00d36bd880ed387f515772e1d023313c.tar.gz
- MFH: Fixed bug with leap year checking.
-rw-r--r--NEWS1
-rw-r--r--ext/standard/datetime.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index dc1a18a634..a9c3197f2b 100644
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,7 @@ PHP 4 NEWS
(Moriyoshi)
- Fixed bug #28175 (Allow bundled GD to compile against freetype 2.1.2).
(Elf, Ilia)
+- Fixed leap year checking with idate(). (Christian Schneider, Derick)
- Fixed strip_tags() to correctly handle '\0' characters. (Stefan)
03 Jun 2004, Version 4.3.7
diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c
index 59461aa421..4de3d5f95f 100644
--- a/ext/standard/datetime.c
+++ b/ext/standard/datetime.c
@@ -64,7 +64,7 @@ static int phpday_tab[2][12] = {
{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
};
-#define isleap(year) (((year % 4) == 0 && (year % 100) != 0) || (year % 400)==0)
+#define isleap(year) ((((year) % 4) == 0 && ((year) % 100) != 0) || ((year) % 400)==0)
#define YEAR_BASE 1900
/* {{{ proto int time(void)