src/TimeLib.php
public static function roundTimestampToDay($timestamp)
    {
        $day   = date('d', $timestamp);
        $month = date('m', $timestamp);
        $year  = date('Y', $timestamp);
        
        $roundedTimestamp = mktime(0, 0, 0, $month, $day, $year);
        
        return $roundedTimestamp;
    }
public static function roundTimestampToDay($timestamp)
    {
        $day   = date('d', $timestamp);
        $month = date('m', $timestamp);
        $year  = date('Y', $timestamp);
        
        $roundedTimestamp = mktime(0, 0, 0, $month, $day, $year);
        
        return $roundedTimestamp;
    }
public static function roundTimestampToDay ( $ timestamp ) { $ day = date ( 'd' , $ timestamp ) ; $ month = date ( 'm' , $ timestamp ) ; $ year = date ( 'Y' , $ timestamp ) ; $ roundedTimestamp = mktime ( 0 , 0 , 0 , $ month , $ day , $ year ) ; return $ roundedTimestamp ; }
Rounds a timestamp down to midnight of the day it was taken.
@param timestamp - the timestamp to round off.
@return roundedTimestamp - the timestamp rounded to midnight of that day.
Rounds a timestamp down to midnight of the day it was taken .