original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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.
docstring_tokens: Build the options for relative date formatting .