ElkArte Community

Project Support => General ElkArte discussions => Topic started by: emanuele on March 29, 2014, 06:39:50 pm

Title: Double check
Post by: emanuele on March 29, 2014, 06:39:50 pm
Code: [Select]
		// If we have a day clean that too.
if ($context['view_week'])
{
if ($curPage['day'] > 31 || !mktime(0, 0, 0, $curPage['month'], $curPage['day'], $curPage['year']))
fatal_lang_error('invalid_day', false);
}

This can be "translated" to:

Code: [Select]
		// If we have a day clean that too.
if ($context['view_week'] && !checkdate($curPage['month'], $curPage['day'], $curPage['year']))
fatal_lang_error('invalid_day', false);

Right?
Title: Re: Double check
Post by: Spuds on March 29, 2014, 07:28:02 pm
Would seem so to me ....
Title: Re: Double check
Post by: emanuele on April 03, 2014, 06:56:00 pm
Darn, I forgot about that one... lol