static InternationalFixedDate create ( int prolepticYear , int month , int dayOfMonth ) { YEAR_RANGE . checkValidValue ( prolepticYear , ChronoField . YEAR_OF_ERA ) ; MONTH_OF_YEAR_RANGE . checkValidValue ( month , ChronoField . MONTH_OF_YEAR ) ; DAY_OF_MONTH_RANGE . checkValidValue ( dayOfMonth , ChronoField . DAY_OF_MONTH ) ; if ( dayOfMonth == DAYS_IN_LONG_MONTH && month != 6 && month != MONTHS_IN_YEAR ) { throw new DateTimeException ( "Invalid date: " + prolepticYear + ' ' + month + ' ' + dayOfMonth ) ; } if ( month == 6 && dayOfMonth == DAYS_IN_LONG_MONTH && ! INSTANCE . isLeapYear ( prolepticYear ) ) { throw new DateTimeException ( "Invalid Leap Day as '" + prolepticYear + "' is not a leap year" ) ; } return new InternationalFixedDate ( prolepticYear , month , dayOfMonth ) ; }
Factory method validates the given triplet year month and dayOfMonth .