src/Helpers/Time.php
public static function date($format = "Y-m-d H:i:s", $time = null)
    {
        $time = ($time !== null ? $time : time());

        if (!is_numeric($time)) {
            $time = static::toUnix($time);
        }

        return date($format, $time);
    }
public static function date($format = "Y-m-d H:i:s", $time = null)
    {
        $time = ($time !== null ? $time : time());

        if (!is_numeric($time)) {
            $time = static::toUnix($time);
        }

        return date($format, $time);
    }
public static function date ( $ format = "Y-m-d H:i:s" , $ time = null ) { $ time = ( $ time !== null ? $ time : time ( ) ) ; if ( ! is_numeric ( $ time ) ) { $ time = static :: toUnix ( $ time ) ; } return date ( $ format , $ time ) ; }
Formats the date.

@param string $format Date format
@param mixed $time Date in unix time or date-time format.

@return string
Formats the date .