birthday display [message #19432] |
Tue, 20 July 2004 12:54 |
betacire
Messages: 18 Registered: July 2004
Karma: 0
|
Junior Member |
|
|
Hi,
I'm using FUDforum 2.6.5RC2.
When somebody register and complete only the year in his birth's date, the date which is displayed in usrinfo or in admin panel is not correct.
Ex : if somebody indicates 1971 as year but no month or day, the date which is displayed in usrinfo is december 00, 1971, and in admin panel : november 30, 1970
Thanks,
|
|
|
Re: birthday display [message #19435 is a reply to message #19432] |
Tue, 20 July 2004 13:06 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
That cannot be helped unfortunately, since to "nicely" format the date PHP date function is used and without a month/day it tends to produce unpredictable results.
FUDforum Core Developer
|
|
|
Re: birthday display [message #19439 is a reply to message #19435] |
Tue, 20 July 2004 13:16 |
betacire
Messages: 18 Registered: July 2004
Karma: 0
|
Junior Member |
|
|
It seems that the variable's value for usrinfo is defined in the function :
function convert_bdate($val, $month_fmt)
{
$ret['year'] = substr($val, 0, 4);
$ret['day'] = substr($val, 6, 2);
$ret['month'] = strftime($month_fmt, mktime(1, 1, 1, substr($val, 4, 2), 11, 2000));
return $ret;
}
Wouldn't it be possible to test if the substr part of $val is different of "00" and otherwise to return an empty string ?
For the admin part, it's not very important.
|
|
|
|