src/TimeLib.php
/**
     * Calculates the number of days there are between two unix timestamps 
     * (seconds since epoch). The times do not need to be specified in any 
     * particular order.
     * 
     * @param time1 - a unix timestamp
     * @param time2 - a unix timestamp.
     * 
     * @return int $numDays - the number of whole days there are between the 
     *                        two timestamps.
     */
Calculates the number of days there are between two unix timestamps
(seconds since epoch). The times do not need to be specified in any
particular order.

@param time1 - a unix timestamp
@param time2 - a unix timestamp.

@return int $numDays - the number of whole days there are between the
two timestamps.
Calculates the number of days there are between two unix timestamps ( seconds since epoch ) . The times do not need to be specified in any particular order . @param time1 - a unix timestamp @param time2 - a unix timestamp . @return int $numDays - the number of whole days there are between the two timestamps .
public static function calculateDayDiff($time1, $time2)
    {
        $timeDiff = abs($time1 - $time2);
        $secondsInDay = 86400;
        $numDays = floor($timeDiff/$secondsInDay);
        return $numDays;
    }
public static function calculateDayDiff ( $ time1 , $ time2 ) { $ timeDiff = abs ( $ time1 - $ time2 ) ; $ secondsInDay = 86400 ; $ numDays = floor ( $ timeDiff / $ secondsInDay ) ; return $ numDays ; }
Calculates the number of days there are between two unix timestamps
 (seconds since epoch).
Calculates the number of days there are between two unix timestamps ( seconds since epoch ) .