How can I convert Hijri date to gregorian in PHP?
Passing 09
as the month is the problem.... a number with a leading zero is treated as octal in PHP. 09
is invalid octal, so it is treated as a 0
.
Calling
$r=HijriToJD(9, 13, 1436);
(without the leading zero for the month) should give you a correct result