added convertToCalendar() method