public static function getJalali($g_y, $g_m, $g_d) {
        $gy = $g_y - 1600;
        $gm = $g_m - 1;
        $g_day_no = (365 * $gy + static::div($gy + 3, 4) - static::div($gy + 99, 100) + static::div($gy + 399, 400));
        for ($i = 0; $i < $gm; ++$i) {
            $g_day_no += static::$daysMonthGregorian[$i];
        }
        if ($gm > 1 && (($gy % 4 == 0 && $gy % 100 != 0) || ($gy % 400 == 0)))
            # leap and after Feb
            $g_day_no ++;
        $g_day_no += $g_d - 1;
        $j_day_no = $g_day_no - 79;
        $j_np = static::div($j_day_no, 12053); # 12053 = (365 * 33 + 32 / 4)
        $j_day_no = $j_day_no % 12053;
        $jy = (979 + 33 * $j_np + 4 * static::div($j_day_no, 1461)); # 1461 = (365 * 4 + 4 / 4)
        $j_day_no %= 1461;
        if ($j_day_no >= 366) {
            $jy += static::div($j_day_no - 1, 365);
            $j_day_no = ($j_day_no - 1) % 365;
        }
        for ($i = 0; ($i < 11 && $j_day_no >= static::$daysMonthJalali[$i]); ++$i) {
            $j_day_no -= static::$daysMonthJalali[$i];
        }
        return array($jy, $i + 1, $j_day_no + 1);
    }
public static function getJalali($g_y, $g_m, $g_d) {
        $gy = $g_y - 1600;
        $gm = $g_m - 1;
        $g_day_no = (365 * $gy + static::div($gy + 3, 4) - static::div($gy + 99, 100) + static::div($gy + 399, 400));
        for ($i = 0; $i < $gm; ++$i) {
            $g_day_no += static::$daysMonthGregorian[$i];
        }
        if ($gm > 1 && (($gy % 4 == 0 && $gy % 100 != 0) || ($gy % 400 == 0)))
            # leap and after Feb
            $g_day_no ++;
        $g_day_no += $g_d - 1;
        $j_day_no = $g_day_no - 79;
        $j_np = static::div($j_day_no, 12053); # 12053 = (365 * 33 + 32 / 4)
        $j_day_no = $j_day_no % 12053;
        $jy = (979 + 33 * $j_np + 4 * static::div($j_day_no, 1461)); # 1461 = (365 * 4 + 4 / 4)
        $j_day_no %= 1461;
        if ($j_day_no >= 366) {
            $jy += static::div($j_day_no - 1, 365);
            $j_day_no = ($j_day_no - 1) % 365;
        }
        for ($i = 0; ($i < 11 && $j_day_no >= static::$daysMonthJalali[$i]); ++$i) {
            $j_day_no -= static::$daysMonthJalali[$i];
        }
        return array($jy, $i + 1, $j_day_no + 1);
    }
public static function getJalali ( $ g_y , $ g_m , $ g_d ) { $ gy = $ g_y - 1600 ; $ gm = $ g_m - 1 ; $ g_day_no = ( 365 * $ gy + static :: div ( $ gy + 3 , 4 ) - static :: div ( $ gy + 99 , 100 ) + static :: div ( $ gy + 399 , 400 ) ) ; for ( $ i = 0 ; $ i < $ gm ; ++ $ i ) { $ g_day_no += static :: $ daysMonthGregorian [ $ i ] ; } if ( $ gm > 1 && ( ( $ gy % 4 == 0 && $ gy % 100 != 0 ) || ( $ gy % 400 == 0 ) ) ) # leap and after Feb $ g_day_no ++ ; $ g_day_no += $ g_d - 1 ; $ j_day_no = $ g_day_no - 79 ; $ j_np = static :: div ( $ j_day_no , 12053 ) ; # 12053 = (365 * 33 + 32 / 4) $ j_day_no = $ j_day_no % 12053 ; $ jy = ( 979 + 33 * $ j_np + 4 * static :: div ( $ j_day_no , 1461 ) ) ; # 1461 = (365 * 4 + 4 / 4) $ j_day_no %= 1461 ; if ( $ j_day_no >= 366 ) { $ jy += static :: div ( $ j_day_no - 1 , 365 ) ; $ j_day_no = ( $ j_day_no - 1 ) % 365 ; } for ( $ i = 0 ; ( $ i < 11 && $ j_day_no >= static :: $ daysMonthJalali [ $ i ] ) ; ++ $ i ) { $ j_day_no -= static :: $ daysMonthJalali [ $ i ] ; } return array ( $ jy , $ i + 1 , $ j_day_no + 1 ) ; }
gregorian to jalali convertion

@param int $g_y
@param int $g_m
@param int $g_d
@return array
gregorian to jalali convertion