I start with two dates:
$endDate = '2013-11-30 18:30:00';
$beginDate = '2013-10-31 18:30:00';
Then, I took date difference using following code:
$diff = abs(strtotime($endDate) - strtotime($beginDate));
Next, I check the date difference by
$days = $diff / (60*60*24);
However, it returns a fractional day, such as 30.041666666667
. I don't want to get this fractional. Why this happening? This problem occurs in some cases only.