Implemented getDaysInMonth function