FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » birthday display
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
birthday display [message #19432] Tue, 20 July 2004 12:54 Go to next message
betacire   France
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 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 Go to previous messageGo to next message
betacire   France
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.

Re: birthday display [message #19441 is a reply to message #19439] Tue, 20 July 2004 13:25 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Validation added.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: registration email issues
Next Topic: Search function doesn't work
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 01:01:58 GMT 2024

Total time taken to generate the page: 0.02609 seconds