public static function human($date, $format = 'l, M j'): string
    {
        $diff = self::parse(Date('Y-m-d'))->diffInDays(self::parse($date), false);
        if ($diff == 0) {
            return 'Today';
        } elseif ($diff == 1) {
            return 'Tomorrow';
        } elseif ($diff == -1) {
            return 'Yesterday';
        } elseif ($diff > 0 && $diff < 7) {
            return self::parse($date)->format('l');
        } elseif ($diff < 0 && $diff > -7) {
            return 'last ' . self::parse($date)->format('l');
        } else {
            return self::parse($date)->format($format);
        }
    }
public static function human($date, $format = 'l, M j'): string
    {
        $diff = self::parse(Date('Y-m-d'))->diffInDays(self::parse($date), false);
        if ($diff == 0) {
            return 'Today';
        } elseif ($diff == 1) {
            return 'Tomorrow';
        } elseif ($diff == -1) {
            return 'Yesterday';
        } elseif ($diff > 0 && $diff < 7) {
            return self::parse($date)->format('l');
        } elseif ($diff < 0 && $diff > -7) {
            return 'last ' . self::parse($date)->format('l');
        } else {
            return self::parse($date)->format($format);
        }
    }
public static function human ( $ date , $ format = 'l, M j' ) : string { $ diff = self :: parse ( Date ( 'Y-m-d' ) ) -> diffInDays ( self :: parse ( $ date ) , false ) ; if ( $ diff == 0 ) { return 'Today' ; } elseif ( $ diff == 1 ) { return 'Tomorrow' ; } elseif ( $ diff == - 1 ) { return 'Yesterday' ; } elseif ( $ diff > 0 && $ diff < 7 ) { return self :: parse ( $ date ) -> format ( 'l' ) ; } elseif ( $ diff < 0 && $ diff > - 7 ) { return 'last ' . self :: parse ( $ date ) -> format ( 'l' ) ; } else { return self :: parse ( $ date ) -> format ( $ format ) ; } }
Convert the provided date into a custom human readable form.

@param  mixed $date
@return string
Convert the provided date into a custom human readable form .