Interface DateResolver

    • Method Detail

      • resolveDate

        LocalDate resolveDate​(int year,
                              MonthOfYear monthOfYear,
                              int dayOfMonth)
        Resolves the combination of year, month and day into a date.

        The purpose of resolution is to avoid invalid dates. Each of the three fields are individually valid. However, the day-of-month may not be valid for the associated month and year.

        Parameters:
        year - the year that was input, from MIN_YEAR to MAX_YEAR
        monthOfYear - the month-of-year, not null
        dayOfMonth - the proposed day-of-month, from 1 to 31
        Returns:
        the resolved date, never null
        Throws:
        InvalidCalendarFieldException - if the date cannot be resolved