CSR-886: remove superfluous logic

This commit is contained in:
Adam Caouette 2023-05-24 14:28:19 -04:00
parent 686355a22b
commit 199ca42189

View file

@ -171,7 +171,7 @@ export default {
},
getNextWeekSunday(date) {
const dayOfWeek = date.getDay();
const daysUntilNextSunday = dayOfWeek === 0 ? 7 : 7 - dayOfWeek; // Calculate the number of days until the next Sunday
const daysUntilNextSunday = 7 - dayOfWeek; // Calculate the number of days until the next Sunday
// Clone the given date and add the remaining days until Sunday
const nextSunday = new Date(date);
nextSunday.setDate(date.getDate() + daysUntilNextSunday);