public static function isYesterday($time): bool
    {
        return (self::factory($time)->format('Y-m-d') === self::factory('yesterday')->format('Y-m-d'));
    }
public static function isYesterday($time): bool
    {
        return (self::factory($time)->format('Y-m-d') === self::factory('yesterday')->format('Y-m-d'));
    }
public static function isYesterday ( $ time ) : bool { return ( self :: factory ( $ time ) -> format ( 'Y-m-d' ) === self :: factory ( 'yesterday' ) -> format ( 'Y-m-d' ) ) ; }
Returns true if date passed was yesterday.

@param string|int $time
@return bool
Returns true if date passed was yesterday .