On a slightly off-topic thing, is there a reason why you only average to December 12th, rather than to the 31st? Also, I can’t see how that function returns anything, all it does is echo the value.
It looks like you want to manage dates (and maybe times), you might want to look into using php built-in functions(methods) instead of making your own. It would save your time and should be easier.
For example:
<?php
function number_of_days($date) {
$today = new DateTime();
$future = new DateTime($date);
$difference = $future->diff($today, true);
echo "There are " . $difference->days . " days till the Detroit Tigers opening day!";
}
number_of_days("2015-04-06 13:08:00");