private static function calculateYearInGrandCycle($year) {
        
        $grandCycle = static::calculateGrandCycle($year);
        
        if ($grandCycle < 0) {
            
            $year = (static::GRAND_CYCLE_BEGINNING + ($grandCycle * static::GRAND_CYCLE_LENGTH)) - $year;
            
        } elseif ($grandCycle > 0) {
            
            $year = $year - (static::GRAND_CYCLE_BEGINNING + ($grandCycle * static::GRAND_CYCLE_LENGTH));
            
        } else {
            
            $year -= static::GRAND_CYCLE_BEGINNING;
        }
        
        $yearInGrandCycle = abs($year) + 1;
        
        return $yearInGrandCycle;
    }
private static function calculateYearInGrandCycle($year) {
        
        $grandCycle = static::calculateGrandCycle($year);
        
        if ($grandCycle < 0) {
            
            $year = (static::GRAND_CYCLE_BEGINNING + ($grandCycle * static::GRAND_CYCLE_LENGTH)) - $year;
            
        } elseif ($grandCycle > 0) {
            
            $year = $year - (static::GRAND_CYCLE_BEGINNING + ($grandCycle * static::GRAND_CYCLE_LENGTH));
            
        } else {
            
            $year -= static::GRAND_CYCLE_BEGINNING;
        }
        
        $yearInGrandCycle = abs($year) + 1;
        
        return $yearInGrandCycle;
    }
private static function calculateYearInGrandCycle ( $ year ) { $ grandCycle = static :: calculateGrandCycle ( $ year ) ; if ( $ grandCycle < 0 ) { $ year = ( static :: GRAND_CYCLE_BEGINNING + ( $ grandCycle * static :: GRAND_CYCLE_LENGTH ) ) - $ year ; } elseif ( $ grandCycle > 0 ) { $ year = $ year - ( static :: GRAND_CYCLE_BEGINNING + ( $ grandCycle * static :: GRAND_CYCLE_LENGTH ) ) ; } else { $ year -= static :: GRAND_CYCLE_BEGINNING ; } $ yearInGrandCycle = abs ( $ year ) + 1 ; return $ yearInGrandCycle ; }
returns the number of year in current grand cycle

@param int $year the year in jalali calendar

@return number
returns the number of year in current grand cycle