@param int $year

@return mixed
16698
public function getHolidaysByYear($year)
    {
        $easter = $this->getEasterDates($year);

        $greatPrayerDay = clone $easter['easterSunday'];
        $greatPrayerDay->modify('+26 days');

        $holidays = array(
            '01-01' => $this->createData('Nytår'),
            '12-25' => $this->createData('1. Juledag'),
            '12-26' => $this->createData('2. Juledag'),

            // Variable dates
            $easter['maundyThursday']->format(self::DATE_FORMAT)  => $this->createData('Skærtorsdag'),
            $easter['goodFriday']->format(self::DATE_FORMAT)      => $this->createData('Langfredag'),
            $easter['easterSunday']->format(self::DATE_FORMAT)    => $this->createData('Påskedag'),
            $easter['easterMonday']->format(self::DATE_FORMAT)    => $this->createData('2. Påskedag'),
            $greatPrayerDay->format(self::DATE_FORMAT)            => $this->createData('Store Bededag'),
            $easter['ascensionDay']->format(self::DATE_FORMAT)    => $this->createData('Kristi Himmelfartsdag'),
            $easter['pentecostSunday']->format(self::DATE_FORMAT) => $this->createData('Pinsedag'),
            $easter['pentecostMonday']->format(self::DATE_FORMAT) => $this->createData('2. Pinsedag')
        );

        return $holidays;
    }
1214768
public static function getDaysByMonthsOfYear($year = null): array
    {
        $year = $year ? $year : date('Y');
        $months = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
        if (self::isLeapYear($year)) $months [1] = 29;
        return $months;
    }
1006973
public function subtractYears($years)
    {
        $years = (int) $years;
        $years = -$years;
        return $this->addYears($years);
    }
1276253
public function get_years($minyear = null, $maxyear = null) {
        if (is_null($minyear)) {
            $minyear = $this->get_min_year();
        }

        if (is_null($maxyear)) {
            $maxyear = $this->get_max_year();
        }

        $years = array();
        for ($i = $minyear; $i <= $maxyear; $i++) {
            $years[$i] = $i;
        }

        return $years;
    }
926466
public function addYears($value)
    {
        if ($this->shouldOverflowYears()) {
            return $this->addYearsWithOverflow($value);
        }

        return $this->addYearsNoOverflow($value);
    }
919677
public static function gregorianToJd($month, $day, $year)
    {
        if ($year == 0) {
            return 0;
        } else {
            return self::$gregorian_calendar->ymdToJd($year, $month, $day);
        }
    }
1053599
public function plusYears(int $years) : YearMonth
    {
        if ($years === 0) {
            return $this;
        }

        return $this->withYear($this->year + $years);
    }
423976
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;
    }
142558
public function getTurmasVirtuais($year, $term)
    {
        $url = $this->endpoint.'minhas-informacoes/turmas-virtuais/'.$year.'/'.$term.'/';

        return $this->doGetRequest($url);
    }
915208
public function isValidYear(int $year) : bool
    {
        return $this->month !== 2 || $this->day !== 29 || Field\Year::isLeap($year);
    }
1243016
protected function getYearly() {
        if (!$this->_yearly) {
            $this->_yearly = new YearlyList($this->version, $this->solution['accountSid']);
        }

        return $this->_yearly;
    }
1129124
public static function cWeeks($year = null) {
		if ($year === null) {
			$year = date('Y');
		}
		return (int)date('W', mktime(23, 59, 59, 12, 28, $year));
	}
1194738
public static function firstDayOfYear($year = null, $format = 'Y-m-d')
    {
        $year = $year ? $year : date('Y');
        return date($format, mktime(0, 0, 0, 1, 1, $year));
    }
459703
public function getMeuBoletim($year, $term)
    {
        $url = $this->endpoint.'minhas-informacoes/boletim/'.$year.'/'.$term.'/';

        return $this->doGetRequest($url);
    }
388004
public function compareTo(Year $that) : int
    {
        if ($this->year > $that->year) {
            return 1;
        }

        if ($this->year < $that->year) {
            return -1;
        }

        return 0;
    }
647079
public function getHolidaysByYear($year)
    {
        $easter = $this->getEasterDates($year);

        return array(
            '01-01' => $this->createData('1. nyttårsdag'),
            '05-01' => $this->createData('1. mai'),
            '05-17' => $this->createData('Grunnlovsdagen'),
            '12-25' => $this->createData('1. juledag'),
            '12-26' => $this->createData('2. juledag'),
            // Variable dates
			$easter['maundyThursday']->format(self::DATE_FORMAT)  => $this->createData('Skjærtorsdag'),
            $easter['goodFriday']->format(self::DATE_FORMAT)      => $this->createData('Langfredag'),
            $easter['easterSunday']->format(self::DATE_FORMAT)    => $this->createData('1. påskedag'),
            $easter['easterMonday']->format(self::DATE_FORMAT)    => $this->createData('2. påskedag'),
            $easter['ascensionDay']->format(self::DATE_FORMAT)    => $this->createData('Kristi Himmelfartsdag'),
            $easter['pentecostMonday']->format(self::DATE_FORMAT) => $this->createData('2. pinsedag'),
		);
    }
1159437
public function get(int $year)
    {
        // convert the Ethiopian year to a Julian year
        // ሚያዝያ 1 is just a random day after the Gregorian new year
        $julian_year = (int) DateTimeFactory::of($year, 8, 1)
            ->toGregorian()->format('Y');

        // get the number of days from vernal equinox to the Easter in the given Julian year
        $days_after = easter_days($julian_year, CAL_EASTER_ALWAYS_JULIAN);

        // get the JDN of vernal equinox (March 21) in the given Julian year
        $jdn = juliantojd(3, 21, $julian_year);

        // add the number of days to Easter
        $jdn += $days_after;

        // create a Ethiopian Date to JDN converter
        $con = new FromJdnConverter($jdn);

        // create an Ethiopian date from the converter
        return DateTimeFactory::of($con->getYear(), $con->getMonth(), $con->getDay(),
            0, 0, 0, $this->dateTimeZone);
    }