code: public function getMax(array $params)
      {
          if (empty($params)) {
              throw new \InvalidArgumentException('Unknown key list');
          }
  
          foreach ($params as $key => $value) {
              if (!($value instanceof \DateTime)) {
                  $params[$key] = $this->get($value);
              }
          }
  
          return max($params);
      }
docs: Get a list of keys or dates and chooses the max date.
  
  @param array $params
  
  @return \DateTime