src/Carbon/Traits/Date.php
public static function hasRelativeKeywords($time)
    {
        if (strtotime($time) === false) {
            return false;
        }

        $date1 = new DateTime('2000-01-01T00:00:00Z');
        $date1->modify($time);
        $date2 = new DateTime('2001-12-25T00:00:00Z');
        $date2->modify($time);

        return $date1 != $date2;
    }
public static function hasRelativeKeywords($time)
    {
        if (strtotime($time) === false) {
            return false;
        }

        $date1 = new DateTime('2000-01-01T00:00:00Z');
        $date1->modify($time);
        $date2 = new DateTime('2001-12-25T00:00:00Z');
        $date2->modify($time);

        return $date1 != $date2;
    }
public static function hasRelativeKeywords ( $ time ) { if ( strtotime ( $ time ) === false ) { return false ; } $ date1 = new DateTime ( '2000-01-01T00:00:00Z' ) ; $ date1 -> modify ( $ time ) ; $ date2 = new DateTime ( '2001-12-25T00:00:00Z' ) ; $ date2 -> modify ( $ time ) ; return $ date1 != $ date2 ; }
Determine if a time string will produce a relative date.

@param string $time

@return bool true if time match a relative date, false if absolute or invalid time string
Determine if a time string will produce a relative date .