xsoh / moment-hijri

A Hijri calendar (Based on Umm al-Qura calculations) plugin for moment.js
http://momentjs.com/docs/#/plugins/hijri/
MIT License
209 stars 84 forks source link

Shawwal month not return from moment hijri (2022) #79

Open MasterMorsy opened 2 years ago

MasterMorsy commented 2 years ago

When I try to print the current month's name which is Shawwal, it always returns Ramadan this happened only in the 2022 year if I try past or next year it works fine

moment().add(1, "year").startOf("month").format("iMMMM")

azizoid commented 2 years ago

It got broken to me too

diana96alazzam commented 1 year ago

I think you need to use iMonth instead of month.

I was facing a similar issue. When I try to get the start of the current Hijri month, it's getting the start of current Gregorian month which is the first of May. Then it gets the equivalent of that day in Hijri calendar which is in Shawwal and not Thul-Qi’dah as expected.