mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-14 04:30:29 +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:
parent
4b04399584
commit
3adda9c1ac
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user