diff options
Diffstat (limited to 'phpBB/memberlist.php')
-rw-r--r-- | phpBB/memberlist.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 225d2927d3..2ace920917 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1331,7 +1331,17 @@ function show_profile($data) { $time = time() + $user->timezone + $user->dst; - $age = (int) (date('Y', $time) - $bday_year - ((date('n', $time) - $bday_month < 0) ? 1 : ((date('j', $time) - $bday_day < 0) ? 1 : 0))); + $diff = date('n', $time) - $bday_month; + if ($diff == 0) + { + $diff = (date('j', $time) - $bday_day < 0) ? 1 : 0; + } + else + { + $diff = ($diff < 0) ? 1 : 0; + } + + $age = (int) (date('Y', $time) - $bday_year - $diff); } } |