You may do the following:
$input = 1369057622.4679;
$diff = floor(($input-time())/86400); // calculating the difference
$result = abs($diff) . (abs($diff)==1 ? ' day ':' days ') . ($diff<=0 ? 'ago':'ahead'); // making the result.
echo $result; // output: 1 day ago