1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-13 20:28:44 +01:00

ok, another fix to the birthday conversion. Thanks rxu for debugging this. :)

git-svn-id: file:///svn/phpbb/trunk@7199 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2007-03-15 08:40:11 +00:00
parent 4b04399584
commit 3adda9c1ac

View File

@ -410,9 +410,12 @@ function phpbb_get_birthday($birthday = '')
return ' 0- 0- 0';
}
$month = substr($birthday, 0, 2);
$day = substr($birthday, 2, 2);
$year = substr($birthday, -4);
// We use the original mod code to retrieve the birthday (not ideal)
preg_match('/(..)(..)(....)/', sprintf('%08d', $birthday), $birthday_parts);
$month = $birthday_parts[1];
$day = $birthday_parts[2];
$year = $birthday_parts[3];
return sprintf('%2d-%2d-%4d', $day, $month, $year);
}