diff --git a/bin/dataScoring.php b/bin/dataScoring.php index b0e3f7fa..49a435ae 100644 --- a/bin/dataScoring.php +++ b/bin/dataScoring.php @@ -74,10 +74,13 @@ else { if ($dateBegin === null) { $dateBegin = new DateTime(); $dateBegin->sub(new DateInterval('P1D')); + // Lundi prendre aussi dimanche + if ($dateBegin->format('w') == 1) { + $dateBegin->sub(new DateInterval('P1D')); + } } $dateBegin->setTime(0, 0, 0); - $c = new Zend_Config($application->getOptions()); $db = Zend_Db::factory($c->profil->db->metier); Zend_Db_Table_Abstract::setDefaultAdapter($db);