moment-hijri icon indicating copy to clipboard operation
moment-hijri copied to clipboard

Date 1/1/1441 does not work

Open hdhaheri opened this issue 6 years ago • 1 comments

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

hdhaheri avatar Apr 08 '18 00:04 hdhaheri

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

ralphnajm avatar Sep 19 '18 11:09 ralphnajm