diff --git a/moment-hijri.js b/moment-hijri.js index 9b9b43c..af71fce 100644 --- a/moment-hijri.js +++ b/moment-hijri.js @@ -687,6 +687,7 @@ return toHijri(this.year(), this.month(), this.date()).hm } } + hMoment.fn.iDate = function (input) { var h, g @@ -711,7 +712,14 @@ } hMoment.fn.iDaysInMonth = function () { - return parseInt(hMoment(this).endOf('iMonth').format('iDD')); + var x = hMoment(this).endOf('iMonth').format('iDD'); + var arToEn = {'٠':0 ,'١':1 ,'٢':2 , '٣':3 , '٤':4 , '٥' :5 , '٦':6 , '٧' :7 , '٨':8 , '٩':9 } + + for (const c of x) { + x = x.replace(c, (arToEn[c] + "")) + } + + return parseInt(x); } hMoment.fn.iWeek = function (input) {