Prise en compte des dimanches en automatique
This commit is contained in:
parent
ae98283511
commit
7bd12f7607
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user