Category : date

I run a CLI Symfony command that works on last month transactions. I can’t think of a way to test it with Behat. Following scenario works but won’t work in December: Scenario: Do something with last month transactions Given there is a transaction "7ccf7387-d45b-4aab-ba52-f25357e4cf75" for 2020-10 And there is a transaction "39d7f278-0687-4ded-a283-4263e81ec09e" for 2020-10 When ..

Read more

I wrote a method within Doctrine to prevent overlapping of new dates that I want to add. I have startDate and endDate there: |———————|——————| | startDate | endDate | |———————|——————| | 07-11-2020 | 13-11-2020 | |———————|——————| | 14-11-2020 | 21-11-2020 | |———————|——————| When I input 4-11 to 15-11 / Exception is thrown as it should ..

Read more

My goal is to output records to an excel sheet from dates between the 20th last month and the 20th this month. The records are worked hours of a user. My query to get the dates: //get user $user = $this->getUser(); //get hours between 20 last month and 20 this month $hours = $this->getDoctrine()->getRepository(Hours::class)->findUserHours($user, $start20, ..

Read more