DateTimeFormatter giving different results;
val formatter = DateTimeFormatter.ofPattern("MMMM - yyyy").withChronology(HijrahChronology.INSTANCE);
val now = HijrahChronology.INSTANCE.date(LocalDate.of(2022, 8, 29));
println(formatter.format(now))
The result is February 1444;
Actually it should be Safar 1444;
I tested code like above with java.time.DateTimeFormatter and it worked as expected.
DateTimeFormatter giving different results;
val formatter = DateTimeFormatter.ofPattern("MMMM - yyyy").withChronology(HijrahChronology.INSTANCE);val now = HijrahChronology.INSTANCE.date(LocalDate.of(2022, 8, 29));println(formatter.format(now))The result is
February 1444;Actually it should be
Safar 1444;I tested code like above with java.time.DateTimeFormatter and it worked as expected.