note 51236 added to function.date

From: Date: Thu, 24 Mar 2005 10:19:51 +0000
Subject: note 51236 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-86876@lists.php.net to get a copy of this message
After using this function, it appears there is a small error with the post from squid at anime-sanctuary dot net. The logic is actually reversed. if($cur_month>$dob_month || ($dob_month==$cur_month && $cur_day>=$dob_day)) return $cur_year-$dob_year; else return $cur_year-$dob_year-1; SHOULD BE if($cur_month>$dob_month || ($dob_month==$cur_month && $cur_day>$dob_day) ) return $cur_year-$dob_year-1; else return $cur_year-$dob_year; Correct me if I am mistaken... ---- Manual Page -- http://www.php.net/manual/en/function.date.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51236 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51236&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51236&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51236&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51236&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51236&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51236&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#86876) next »