Morilog\Jalali\jDateTime::g2d PHP Method

g2d() public static method

The procedure was tested to be good since 1 March, -100100 (of both calendars) up to a few million years into the future.
public static g2d ( integer $gy, integer $gm, integer $gd ) : integer
$gy integer Calendar year (years BC numbered 0, -1, -2, ...)
$gm integer Calendar month (1 to 12)
$gd integer Calendar day of the month (1 to 28/29/30/31)
return integer Julian Day number
    public static function g2d($gy, $gm, $gd)
    {
        return self::div(($gy + self::div($gm - 8, 6) + 100100) * 1461, 4) + self::div(153 * self::mod($gm + 9, 12) + 2, 5) + $gd - 34840408 - self::div(self::div($gy + 100100 + self::div($gm - 8, 6), 100) * 3, 4) + 752;
    }