public static function getWeekCriteria($date, $c = null) { if (is_null($c)) { $c = new Criteria(); } $cton1 = $c->getNewCriterion(CloseperiodPeer::STOP, strftime('%Y-%m-%d', ReservationPeer::getWeekStart($date)), Criteria::GREATER_THAN); $cton2 = $c->getNewCriterion(CloseperiodPeer::START, strftime('%Y-%m-%d', ReservationPeer::getWeekStop($date)), Criteria::LESS_THAN); $cton1->addAnd($cton2); $c->addAnd($cton1); return $c; }