Generate the %y format for a date.

NOTE Short year is NOT a 2-digit year. It is for calendars such as hebrew
which have a 3-digit form of 4-digit years.

@return string
488092
protected function formatShortYear(): string
    {
        $locale = app(LocaleInterface::class)->language()->code();

        if ($locale === 'he' || $locale === 'yi') {
            return (new JewishCalendar())->numberToHebrewNumerals($this->year, false);
        }

        return parent::formatLongYear();
    }
626036
protected function formatGedcomMonth(): string
    {
        // Our simple lookup table doesn't work correctly for Adar on leap years
        if ($this->month === 7 && $this->calendar instanceof JewishCalendar && !$this->calendar->isLeapYear($this->year)) {
            return 'ADR';
        }

        return array_search($this->month, static::MONTH_ABBREVIATIONS, true);
    }
1045655
function yy_r180()
    {
        $this->_retvalue =
            '\'' . $this->yystack[ $this->yyidx + - 2 ]->minor . '\'=>' . $this->yystack[ $this->yyidx + 0 ]->minor;
    }
383281
function yy_r24(){
    $this->_retvalue = self::escape_end_tag($this->yystack[$this->yyidx + 0]->minor);
    }
855790
function yy_r95(){
    $this->_retvalue = '(1 & '.$this->yystack[$this->yyidx + -2]->minor.' / '.$this->yystack[$this->yyidx + 0]->minor.')';
    }
356378
function yy_r67(){
    $this->_retvalue = array(trim($this->yystack[$this->yyidx + -1]->minor," =\n\r\t")=>$this->yystack[$this->yyidx + 0]->minor);
    }
1106891
function yy_r66(){
    if (preg_match('~^true$~i', $this->yystack[$this->yyidx + 0]->minor)) {
        $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'true');
    } elseif (preg_match('~^false$~i', $this->yystack[$this->yyidx + 0]->minor)) {
        $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'false');
    } elseif (preg_match('~^null$~i', $this->yystack[$this->yyidx + 0]->minor)) {
        $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'null');
    } else {
        $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>"'".$this->yystack[$this->yyidx + 0]->minor."'");
    }
    }
662798
public function getRangeString()
    {
        $dateStart = $this->getDateStart();
        $dateEnd   = $this->getDateEnd();

        return $dateStart->toString("Y-m-d") . "," . $dateEnd->toString("Y-m-d");
    }
1129000
function yy_r129(){
    $this->_retvalue = '(is_array($tmp = $_smarty_tpl->getConfigVariable('. $this->yystack[$this->yyidx + -2]->minor .')) ? $tmp'.$this->yystack[$this->yyidx + 0]->minor.' : null)';
    }
1175425
function yy_r192(){
  if ($this->yystack[$this->yyidx + -1]->minor{0} === '!') {
    $this->_retvalue = yy('Op', substr($this->yystack[$this->yyidx + -1]->minor, 1), $this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor);
    $this->_retvalue = $this->_retvalue->invert();
  }
  else {
    $this->_retvalue = yy('Op', $this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + -2]->minor, $this->yystack[$this->yyidx + 0]->minor);
  }
    }
676980
public function toString()
    {
        $translator = call_user_func([$this->dateClass, 'getTranslator']);

        $parts = [];

        $format = !$this->startDate->isStartOfDay() || $this->endDate && !$this->endDate->isStartOfDay()
            ? 'Y-m-d H:i:s'
            : 'Y-m-d';

        if ($this->recurrences !== null) {
            $parts[] = $this->translate('period_recurrences', [], $this->recurrences, $translator);
        }

        $parts[] = $this->translate('period_interval', [':interval' => $this->dateInterval->forHumans([
            'join' => true,
        ])], null, $translator);

        $parts[] = $this->translate('period_start_date', [':date' => $this->startDate->rawFormat($format)], null, $translator);

        if ($this->endDate !== null) {
            $parts[] = $this->translate('period_end_date', [':date' => $this->endDate->rawFormat($format)], null, $translator);
        }

        $result = implode(' ', $parts);

        return mb_strtoupper(mb_substr($result, 0, 1)).mb_substr($result, 1);
    }
276899
public function getPHPDatePattern()
    {
        $isoFormat = Calendar::getDateFormat('short');
        $result = Calendar::tryConvertIsoToPhpFormat($isoFormat);
        if ($result === null) {
            $result = t(/*i18n: Short date format: see http://www.php.net/manual/en/function.date.php */ 'n/j/Y');
        }

        return $result;
    }
1039287
function yy_r183(){
    $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor;
    }
40452
function yy_r154(){
    $this->_retvalue = array_merge($this->yystack[$this->yyidx + -2]->minor,array($this->yystack[$this->yyidx + 0]->minor));
    }
1348701
public function y()
    {
        // Load file
        $file = new \SplFileObject($this->storage('finals.all'));

        // Get instance MJD, and MJD at line 0
        $mjdQ = $this->mjd;
        $mjd0 = (int)substr($file->getCurrentLine(), 7, 8);

        // Check for requested MJD before first date
        if ($mjdQ < $mjd0) {
            return false;
        }

        // Determine nearest center pointer
        $p = $mjdQ - $mjd0 - 1;

        // Fix for values within |n| of lower bound
        if ($p < static::INTERP_C && $p > -static::INTERP_C) {
            $p = static::INTERP_C;
        }

        // Compile dataset
        $ds = [];
        for ($i = $p - static::INTERP_C; $i < $p + static::INTERP_C; $i++) {
            $file->seek($i);
            $line = $file->getCurrentLine();

            // Parse data from line
            $mjd = substr($line, 7, 8);
            $yf  = substr($line, 146, 9);
            $yp  = substr($line, 27, 9);

            // Use final value first, if not present use prediction
            $y = trim($yf) ? $yf : $yp;

            // Check if no dut1 data, error
            if (trim($y) == '') {
                return false;
            }

            // Add the data
            $ds[$i - $p + static::INTERP_C]['x'] = (float)$mjd;
            $ds[$i - $p + static::INTERP_C]['y'] = (float)$y;
        }

        // Interpolate pole y
        return $this->lagrangeInterp($mjdQ, $ds);
    }
958066
function toString( $short = false )
    {
        if ( $short )
            $str = $this->Locale->formatShortDate( $this->DateTime ) . ' ' .
                $this->Locale->formatShortTime( $this->DateTime );
        else
            $str = $this->Locale->formatDate( $this->DateTime ) . ' ' .
                $this->Locale->formatTime( $this->DateTime );
        return $str;
    }
1099090
function yy_r74(){
    $this->_retvalue = array('var' => $this->yystack[$this->yyidx + -2]->minor, 'value'=>$this->yystack[$this->yyidx + 0]->minor);
    }