summaryrefslogtreecommitdiff
path: root/ext/standard/datetime.c
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2000-09-03 04:09:48 +0000
committerfoobar <sniper@php.net>2000-09-03 04:09:48 +0000
commit436ca5d9bbea8cc69796361f2b5c9ba690fd5413 (patch)
tree5e470c93659146cdff800906c31707e35ab39fc7 /ext/standard/datetime.c
parenta666910848414f2d9704ff2930ccf4071ebd8248 (diff)
downloadphp-git-436ca5d9bbea8cc69796361f2b5c9ba690fd5413.tar.gz
@- Fixed a bug in checkdate() which caused < 1 years to be valid (Jani)
# Bug #6254
Diffstat (limited to 'ext/standard/datetime.c')
-rw-r--r--ext/standard/datetime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c
index 44298107f7..cb97eb6d11 100644
--- a/ext/standard/datetime.c
+++ b/ext/standard/datetime.c
@@ -616,7 +616,7 @@ char *php_std_date(time_t t)
/* {{{ proto bool checkdate(int month, int day, int year)
- Returns true(1) if it is a valid date */
+ Returns true(1) if it is a valid date in gregorian calendar */
PHP_FUNCTION(checkdate)
{
pval **month, **day, **year;
@@ -640,7 +640,7 @@ PHP_FUNCTION(checkdate)
m = (*month)->value.lval;
d = (*day)->value.lval;
- if (y < 0 || y > 32767) {
+ if (y < 1 || y > 32767) {
RETURN_FALSE;
}
if (m < 1 || m > 12) {