calendarProvider: simplify code