prise en compte des breakday à posteriori (ref #5)
This commit is contained in:
parent
ba8a19307e
commit
379dcfe12c
|
@ -83,12 +83,15 @@ class BreakdayCommand extends Command
|
||||||
foreach($users as $user) {
|
foreach($users as $user) {
|
||||||
if(!$user->hasRole("ROLE_USER")) continue;
|
if(!$user->hasRole("ROLE_USER")) continue;
|
||||||
|
|
||||||
|
$mini=new \Datetime('2022-03-07 00:00');
|
||||||
$start=new \Datetime('00:00');
|
$start=new \Datetime('00:00');
|
||||||
$start->modify("monday this week");
|
$start->modify("monday this week");
|
||||||
$end=new \Datetime('00:00');
|
$end=new \Datetime('00:00');
|
||||||
$end->modify("last day of this month");
|
$end->modify("last day of this month");
|
||||||
$end->modify("next sunday");
|
$end->modify("next sunday");
|
||||||
|
$start->modify("previous month");
|
||||||
|
if($start<$mini) $start=clone $mini;
|
||||||
|
|
||||||
$response=$this->api("POST",$url."/getBreakdays",json_encode(["key"=>$key,"username"=>$user->getUsername()]));
|
$response=$this->api("POST",$url."/getBreakdays",json_encode(["key"=>$key,"username"=>$user->getUsername()]));
|
||||||
|
|
||||||
if($response&&$response->code=="200") {
|
if($response&&$response->code=="200") {
|
||||||
|
|
Loading…
Reference in New Issue