Exemplo n.º 1
0
 /**
  * Returns the entire enumeration bare.
  */
 public function evaluate()
 {
     $date = $this->getParameters()->evaluate();
     $params = DateExpression::parse($date);
     if (!$params) {
         return false;
     }
     // if the date expression doesn't have a time on it or the def is type of 'date' then force
     // the time to be midnight on that day
     if (!DateExpression::hasTime($date) || isset($date->def) && $date->def['type'] === 'date') {
         $params->setTime(0, 0, 0);
     }
     return $params->getTimestamp();
 }