private function setYear($year) {
        
        //preventing duplication process
        if ($year == $this->year) {
            return;
        }
        $this->year          = (int) $year;
        $maximumDayAvailable = static::getMonthLength($this->year, $this->month);
        if ($this->day > $maximumDayAvailable) {
            $this->day = $maximumDayAvailable;
        }
    }
private function setYear($year) {
        
        //preventing duplication process
        if ($year == $this->year) {
            return;
        }
        $this->year          = (int) $year;
        $maximumDayAvailable = static::getMonthLength($this->year, $this->month);
        if ($this->day > $maximumDayAvailable) {
            $this->day = $maximumDayAvailable;
        }
    }
private function setYear ( $ year ) { //preventing duplication process if ( $ year == $ this -> year ) { return ; } $ this -> year = ( int ) $ year ; $ maximumDayAvailable = static :: getMonthLength ( $ this -> year , $ this -> month ) ; if ( $ this -> day > $ maximumDayAvailable ) { $ this -> day = $ maximumDayAvailable ; } }
Update year in jalali date

@param int $year
Update year in jalali date