Hi,
I am using datediff() function to get difference between two dates.
my code looks like,
this gives error as "Warning: gregoriantojd() expects parameter 2 to be long"
but problem occurs for particular dates only not for all.
What should i do to overcome this. can you please give me helping hand.
Thank you in advance.
I am using datediff() function to get difference between two dates.
my code looks like,
Code:
function dateDiff($dformat, $endDate, $beginDate)
{
$date_parts1 = explode($dformat, $beginDate);
$date_parts2 = explode($dformat, $endDate);
$start_date = gregoriantojd($date_parts1[1], $date_parts1[0], $date_parts1[2]);
$end_date = gregoriantojd($date_parts2[1], $date_parts2[0], $date_parts2[2]);
return $end_date - $start_date;
}
but problem occurs for particular dates only not for all.
What should i do to overcome this. can you please give me helping hand.
Thank you in advance.
Comment