original_string: protected function _singleDatetime($options, $keep)
      {
          $off = array_diff($this->_datetimeParts, [$keep]);
          $off = array_combine(
              $off,
              array_fill(0, count($off), false)
          );
  
          $attributes = array_diff_key(
              $options,
              array_flip(array_merge($this->_datetimeOptions, ['value', 'empty']))
          );
          $options = $options + $off + [$keep => $attributes];
  
          if (isset($options['value'])) {
              $options['val'] = $options['value'];
          }
  
          return $options;
      }
code: protected function _singleDatetime($options, $keep)
      {
          $off = array_diff($this->_datetimeParts, [$keep]);
          $off = array_combine(
              $off,
              array_fill(0, count($off), false)
          );
  
          $attributes = array_diff_key(
              $options,
              array_flip(array_merge($this->_datetimeOptions, ['value', 'empty']))
          );
          $options = $options + $off + [$keep => $attributes];
  
          if (isset($options['value'])) {
              $options['val'] = $options['value'];
          }
  
          return $options;
      }
code_tokens: protected function _singleDatetime ( $ options , $ keep ) { $ off = array_diff ( $ this -> _datetimeParts , [ $ keep ] ) ; $ off = array_combine ( $ off , array_fill ( 0 , count ( $ off ) , false ) ) ; $ attributes = array_diff_key ( $ options , array_flip ( array_merge ( $ this -> _datetimeOptions , [ 'value' , 'empty' ] ) ) ) ; $ options = $ options + $ off + [ $ keep => $ attributes ] ; if ( isset ( $ options [ 'value' ] ) ) { $ options [ 'val' ] = $ options [ 'value' ] ; } return $ options ; }
docstring: Helper method for the various single datetime component methods.
  
  @param array $options The options array.
  @param string $keep The option to not disable.
  @return array
docstring_tokens: Helper method for the various single datetime component methods .