public static Formatter forDates(@Nonnull String format) {
        return new DateFormat(format);
    }
@Test
    public void testDates() {
        Formatter f = forDates("FMDay, Mon FMDDth, FMYYYY");
        check(LocalDate.of(2022, 9, 26), f, "Monday, Sep 26th, 2022");

        f = forDates("FMDD FMMonth FMYYYY");
        check(LocalDate.of(2022, 9, 26), f, "26 Eylül 2022", TR);

        f = forDates("YYYY-MM-DD FMHH:MI AM OF");
        check(LocalDateTime.of(2022, 9, 26, 14, 53).atOffset(ZoneOffset.ofHours(3)), f,
                "2022-09-26 2:53 PM +03:00");

        f = forDates("HH12:MI A.M. TZTZH:TZM");
        check(LocalTime.of(14, 53).atOffset(ZoneOffset.ofHours(3)), f, "02:53 P.M. GMT+03:00");

        f = forDates("HH12:MI A.M.");
        check(LocalTime.of(14, 53), f, "02:53 Ö.S.", TR);

        f = forDates("At HH24:MI:SS, FMSSSS(=FMSSSSS) \"seconds are passed from the midnight.\"");
        check(LocalTime.of(12, 34, 56), f,
                "At 12:34:56, 45296(=45296) seconds are passed from the midnight.");

        f = forDates("YYYY-MM-DD \"is the\" FMDDDth \"day of\" FMYYYY.");
        check(LocalDate.of(2022, 9, 26), f, "2022-09-26 is the 269th day of 2022.");

        f = forDates("Y,YYY YYYY YYY YY Y - FMY,YYY FMYYYY FMYYY FMYY FMY");
        check(Year.of(1), f, "0,001 0001 001 01 1 - 1 1 1 1 1");

        f = forDates("FF1 FF2 FF3(=MS) FF4 FF5 FF6(=US)");
        check(LocalTime.ofNanoOfDay(123456789), f, "1 12 123(=123) 1234 12345 123456(=123456)");

        f = forDates("\"Quarter\" FMYYYY-\"Q\"Q \"is in the\" FMCCth \"century.\"");
        check(YearMonth.of(2022, 9), f, "Quarter 2022-Q3 is in the 21st century.");

        f = forDates("\"Plato founded the Academy in c.\" FMYYYY AD.");
        check(Year.of(-386), f, "Plato founded the Academy in c. 387 BC.");

        f = forDates("\"Plato Akademi'yi\" A.D. FMYYYY \"civarında kurdu.\"");
        check(Year.of(-386), f, "Plato Akademi'yi M.Ö. 387 civarında kurdu.", TR);

        f = forDates("AD(=BC) A.D.(=B.C.) ad(=bc) a.d.(=b.c.)");
        check(Year.of(0), f, "BC(=BC) B.C.(=B.C.) bc(=bc) b.c.(=b.c.)");

        f = forDates("\"The Halley's closest approach to the Earth was on\" FMDD FMMonth FMYYYY AD (the FMJth \"Julian day\").");
        check(LocalDate.of(837, 2, 28), f,
                "The Halley's closest approach to the Earth was on 28 February 837 AD (the 2026827th Julian day).");

        f = forDates("FMRM.FMRD.FMRY");
        check(LocalDate.of(2022, 9, 26), f, "IX.XXVI.MMXXII");
    }