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

DateTimeException when using set method #33

Open
anastr opened this issue Sep 8, 2021 · 0 comments
Open

DateTimeException when using set method #33

anastr opened this issue Sep 8, 2021 · 0 comments

Comments

@anastr
Copy link

anastr commented Sep 8, 2021

Simply trying to add/set a month or a year to the calender object when DAY_OF_MONTH is 30. It'll throw DateTimeException: Invalid Hijrah day of month: 30 because it has 29 days in the new month.
Fore ex:

calendar.add(UmmalquraCalendar.MONTH, 1)
// Or using set
calendar[UmmalquraCalendar.YEAR] = 1446

This doesn't happen with Calender, it'll pick the last day of month of the new month instead.

Thanks in advance!

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

No branches or pull requests

1 participant