protected function interpretDateIndicator($indicator)
    {
        if ( ! is_string($indicator)) {
            throw new \UnexpectedValueException('Unexpected date indicator value: ' . print_r($indicator, true));
        }

        if ('now' === strtolower($indicator)) {
            return Carbon::now()->format('Y-m-d H:i:s');
        }

        if (starts_with($indicator, '-')) {
            return Carbon::now()->sub(
                new \DateInterval(substr($indicator, 1))
            )->format('Y-m-d H:i:s');
        }
        if (starts_with($indicator, '+')) {
            return Carbon::now()->add(
                new \DateInterval(substr($indicator, 1))
            )->format('Y-m-d H:i:s');
        }

        return (new Carbon($indicator))->format('Y-m-d H:i:s');
    }
protected function interpretDateIndicator($indicator)
    {
        if ( ! is_string($indicator)) {
            throw new \UnexpectedValueException('Unexpected date indicator value: ' . print_r($indicator, true));
        }

        if ('now' === strtolower($indicator)) {
            return Carbon::now()->format('Y-m-d H:i:s');
        }

        if (starts_with($indicator, '-')) {
            return Carbon::now()->sub(
                new \DateInterval(substr($indicator, 1))
            )->format('Y-m-d H:i:s');
        }
        if (starts_with($indicator, '+')) {
            return Carbon::now()->add(
                new \DateInterval(substr($indicator, 1))
            )->format('Y-m-d H:i:s');
        }

        return (new Carbon($indicator))->format('Y-m-d H:i:s');
    }
protected function interpretDateIndicator ( $ indicator ) { if ( ! is_string ( $ indicator ) ) { throw new \ UnexpectedValueException ( 'Unexpected date indicator value: ' . print_r ( $ indicator , true ) ) ; } if ( 'now' === strtolower ( $ indicator ) ) { return Carbon :: now ( ) -> format ( 'Y-m-d H:i:s' ) ; } if ( starts_with ( $ indicator , '-' ) ) { return Carbon :: now ( ) -> sub ( new \ DateInterval ( substr ( $ indicator , 1 ) ) ) -> format ( 'Y-m-d H:i:s' ) ; } if ( starts_with ( $ indicator , '+' ) ) { return Carbon :: now ( ) -> add ( new \ DateInterval ( substr ( $ indicator , 1 ) ) ) -> format ( 'Y-m-d H:i:s' ) ; } return ( new Carbon ( $ indicator ) ) -> format ( 'Y-m-d H:i:s' ) ; }
Interprets a date indicator string value as a date time string relative to the current date.

@param string $indicator
@return string
Interprets a date indicator string value as a date time string relative to the current date .