private static function calculateGrandCycle($year) {
        
        $endOfFirstGrandCycle = static::GRAND_CYCLE_BEGINNING + static::GRAND_CYCLE_LENGTH;
        
        // by default we are in the first grand cycle
        $grandCycle = 0;
        if ($year < static::GRAND_CYCLE_BEGINNING) {
            
            $beginningYear = static::GRAND_CYCLE_BEGINNING;
            while ($year < $beginningYear) {
                $beginningYear -= static::GRAND_CYCLE_LENGTH;
                $grandCycle--;
            }
            
        } elseif ($year >= $endOfFirstGrandCycle) {
            
            $beginningYear = $endOfFirstGrandCycle;
            while ($year >= $beginningYear) {
                $beginningYear += static::GRAND_CYCLE_LENGTH;
                $grandCycle++;
            }
        }
        
        return $grandCycle;
    }