fix: stabilize two CI test failures (Paris today, worker cancel race) #307
@@ -85,11 +85,9 @@ export class CalendarService {
|
|||||||
const holidays = new Set(
|
const holidays = new Set(
|
||||||
this.getHolidays(first.getFullYear(), last.getFullYear()).map((h) => h.getTime()),
|
this.getHolidays(first.getFullYear(), last.getFullYear()).map((h) => h.getTime()),
|
||||||
);
|
);
|
||||||
const {
|
const [todayYear, todayMonth, todayDate] = planningDateInParis(new Date())
|
||||||
date: todayDate,
|
.split('-')
|
||||||
month: todayMonth,
|
.map(Number);
|
||||||
year: todayYear,
|
|
||||||
} = this.dateCache.getTodayComponents();
|
|
||||||
const months: CalendarProjection['months'] = [];
|
const months: CalendarProjection['months'] = [];
|
||||||
const ranges: SelectedDate[] = [];
|
const ranges: SelectedDate[] = [];
|
||||||
const cursor = new Date(first);
|
const cursor = new Date(first);
|
||||||
@@ -124,7 +122,7 @@ export class CalendarService {
|
|||||||
);
|
);
|
||||||
if (
|
if (
|
||||||
day.getDate() === todayDate &&
|
day.getDate() === todayDate &&
|
||||||
day.getMonth() === todayMonth &&
|
day.getMonth() + 1 === todayMonth &&
|
||||||
day.getFullYear() === todayYear
|
day.getFullYear() === todayYear
|
||||||
)
|
)
|
||||||
ranges.push(new SelectedDate(DayType.TODAY, new DateRange<Date>(day, day)));
|
ranges.push(new SelectedDate(DayType.TODAY, new DateRange<Date>(day, day)));
|
||||||
|
|||||||
Reference in new issue
Block a user