moment-hijri
moment-hijri copied to clipboard
Date 1/1/1441 does not work
When the date is set to 1/1/1441 endOf('iMonth) will return 1. Which is wrong!
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