Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateTimeFormatter for HijrahChronology #166

Open
Khudoyshukur opened this issue Aug 28, 2022 · 1 comment
Open

DateTimeFormatter for HijrahChronology #166

Khudoyshukur opened this issue Aug 28, 2022 · 1 comment
Labels

Comments

@Khudoyshukur
Copy link

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.

@jodastephen
Copy link
Member

You are right that HijrahChronology should work, but it needs a lot of work to do so. Lots of work happened on the JDK's HijrahChronology after this project forked, and no-one can just copy the changes.

The text is also much more complete in the JDK than here, which again would be a large thing to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants