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

How can I initialize moment hijri with millesconds and get the hijri date

Open d-mance opened this issue 5 years ago • 1 comments

Hello,

I am trying to get the hijri date based on unix time but i am getting gregorian date instead.

const justNow = new Date(); const momentHijriNow = momentHijri.unix(justNow.valueOf() / 1000); console.log('momentHijri now', momentHijriNow.format('iYYYY/iM/iD')); // momentHijri now i2019/i2/i6

Maybe I am doing really wrong :S

Thanks for your job ;)

d-mance avatar Feb 06 '19 11:02 d-mance

any luck finding a solution? I'm stuck with the same problem

mazenadel19 avatar Feb 15 '22 09:02 mazenadel19