implement DutyCalendar and add test case