Skip to content

Commit

Permalink
fix: getEvent month
Browse files Browse the repository at this point in the history
  • Loading branch information
ikit committed Nov 4, 2022
1 parent b54f6a8 commit 12945d0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions absg-core/src/services/EventService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,12 @@ class EventService {

// On récupères les anniversaires
const months = [];
for (let m = startDate.getMonth(); m <= endDate.getMonth(); m++) {
months.push(m + 1);
let currentDate = startDate;
while (currentDate < endDate) {
months.push(currentDate.getMonth() + 1);
currentDate = addMonths(currentDate, 1);
}

q = `SELECT *
FROM person
WHERE
Expand Down

0 comments on commit 12945d0

Please sign in to comment.