|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DateResolver
Strategy for resolving an invalid year-month-day to a valid one.
This interface defines the strategy used to resolve invalid dates like February 30th or November 31st.
This interface must be implemented with care to ensure other classes in the framework operate correctly. All implementations that can be instantiated must be final, immutable and thread-safe.
Method Summary | |
---|---|
LocalDate |
resolveDate(int year,
MonthOfYear monthOfYear,
int dayOfMonth)
Resolves the combination of year, month and day into a date. |
Method Detail |
---|
LocalDate resolveDate(int year, MonthOfYear monthOfYear, int dayOfMonth)
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.
year
- the year that was input, from MIN_YEAR to MAX_YEARmonthOfYear
- the month-of-year, not nulldayOfMonth
- the proposed day-of-month, from 1 to 31
InvalidCalendarFieldException
- if the date cannot be resolved
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |