Arun Arun - 1 year ago 72
Javascript Question

how to convert hijari date into gregorian date in java script?

i am use intalio editer in that i want to convert hijari date into gregorian date or vice-versa. we write code in java script using jsx3 so please help me.

Answer Source

It helps to know that muslims refer to the Gregorian calendar as Masihi. Googling for "hijrah to masihi converter" turns up this page as the second hit:

The javascript is code contains two functions GregToIsl and IslToGreg that does what you want.

There is a copyright notice on that page so you shouldn't simply copy-paste the code. But the functions are short enough for you to extract the relevant maths out of.

The maths/algorithm itself is almost a thousand years old so it shouldn't have any legal restriction.