protected function _options($options, $class)
    {
        $options += [
            'from' => $class::now(),
            'timezone' => null,
            'format' => $class::$wordFormat,
            'accuracy' => $class::$wordAccuracy,
            'end' => $class::$wordEnd,
            'relativeString' => __d('cake', '%s ago'),
            'absoluteString' => __d('cake', 'on %s'),
        ];
        if (is_string($options['accuracy'])) {
            $accuracy = $options['accuracy'];
            $options['accuracy'] = [];
            foreach ($class::$wordAccuracy as $key => $level) {
                $options['accuracy'][$key] = $accuracy;
            }
        } else {
            $options['accuracy'] += $class::$wordAccuracy;
        }

        return $options;
    }
protected function _options($options, $class)
    {
        $options += [
            'from' => $class::now(),
            'timezone' => null,
            'format' => $class::$wordFormat,
            'accuracy' => $class::$wordAccuracy,
            'end' => $class::$wordEnd,
            'relativeString' => __d('cake', '%s ago'),
            'absoluteString' => __d('cake', 'on %s'),
        ];
        if (is_string($options['accuracy'])) {
            $accuracy = $options['accuracy'];
            $options['accuracy'] = [];
            foreach ($class::$wordAccuracy as $key => $level) {
                $options['accuracy'][$key] = $accuracy;
            }
        } else {
            $options['accuracy'] += $class::$wordAccuracy;
        }

        return $options;
    }
protected function _options ( $ options , $ class ) { $ options += [ 'from' => $ class :: now ( ) , 'timezone' => null , 'format' => $ class :: $ wordFormat , 'accuracy' => $ class :: $ wordAccuracy , 'end' => $ class :: $ wordEnd , 'relativeString' => __d ( 'cake' , '%s ago' ) , 'absoluteString' => __d ( 'cake' , 'on %s' ) , ] ; if ( is_string ( $ options [ 'accuracy' ] ) ) { $ accuracy = $ options [ 'accuracy' ] ; $ options [ 'accuracy' ] = [ ] ; foreach ( $ class :: $ wordAccuracy as $ key => $ level ) { $ options [ 'accuracy' ] [ $ key ] = $ accuracy ; } } else { $ options [ 'accuracy' ] += $ class :: $ wordAccuracy ; } return $ options ; }
Build the options for relative date formatting.

@param array $options The options provided by the user.
@param string $class The class name to use for defaults.
@return array Options with defaults applied.
Build the options for relative date formatting .