public static JapaneseCalendar ofGregorian(
        Nengo nengo,
        int yearOfNengo,
        int month,
        int dayOfMonth
    ) {

        if (!nengo.isModern() || ((nengo == Nengo.MEIJI) && (yearOfNengo < 6))) {
            throw new IllegalArgumentException("Cannot create modern calendar with lunisolar calendar year.");
        }

        return JapaneseCalendar.of(nengo, yearOfNengo, EastAsianMonth.valueOf(month), dayOfMonth, Leniency.SMART);

    }
public static JapaneseCalendar ofGregorian ( Nengo nengo , int yearOfNengo , int month , int dayOfMonth ) { if ( ! nengo . isModern ( ) || ( ( nengo == Nengo . MEIJI ) && ( yearOfNengo < 6 ) ) ) { throw new IllegalArgumentException ( "Cannot create modern calendar with lunisolar calendar year." ) ; } return JapaneseCalendar . of ( nengo , yearOfNengo , EastAsianMonth . valueOf ( month ) , dayOfMonth , Leniency . SMART ) ; }
/*[deutsch]
<p>Erzeugt einen modernen japanischen Kalender f&uuml;r jedes Datum seit Meiji 6
(gregorianische Kalenderregeln). </p>

<p>Die gregorianische Bedingung au&szlig;er Acht lassend, &auml;quivalent zu
{@code JapaneseCalendar.of(nengo, yearOfNengo, EastAsianMonth.valueOf(month), dayOfMonth, Leniency.SMART)}. </p>

@param   nengo           Japanese era (Meiji or later)
@param   yearOfNengo     year of nengo starting with number 1 (if Meiji then starting with 6)
@param   month           gregorian month (1-12)
@param   dayOfMonth      day of month {@code >= 1}
@return  new instance of {@code JapaneseCalendar}
@throws  IllegalArgumentException in case of any inconsistencies
@see     #of(Nengo, int, EastAsianMonth, int, Leniency)