refactoring CalendarAPI for fix boundary of date