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

Date 1/1/1441 does not work #33

Open
hdhaheri opened this issue Apr 8, 2018 · 1 comment
Open

Date 1/1/1441 does not work #33

hdhaheri opened this issue Apr 8, 2018 · 1 comment

Comments

@hdhaheri
Copy link

hdhaheri commented Apr 8, 2018

When the date is set to 1/1/1441 endOf('iMonth) will return 1. Which is wrong!

@ralphnajm
Copy link

ralphnajm commented Sep 19, 2018

A workaround for this is to use the iDaysInMonth property from the hMoment library directly
hMoment.iDaysInMonth(date.iYear(), date.iMonth())
Where date is your moment object, or just pass in the iyear and imonth directly as parameters.
This method doesn't suffer from the same issues as the others because it only relies on the ummalqura Data

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

2 participants