app/Date/AbstractCalendarDate.php
public function calendarUrl(string $date_format, Tree $tree): string
    {
        if ($this->day !== 0 && strpbrk($date_format, 'dDj')) {
            // If the format includes a day, and the date also includes a day, then use the day view
            $view = 'day';
        } elseif ($this->month !== 0 && strpbrk($date_format, 'FMmn')) {
            // If the format includes a month, and the date also includes a month, then use the month view
            $view = 'month';
        } else {
            // Use the year view
            $view = 'year';
        }

        return route('calendar', [
            'cal'   => $this->calendar->gedcomCalendarEscape(),
            'year'  => $this->formatGedcomYear(),
            'month' => $this->formatGedcomMonth(),
            'day'   => $this->formatGedcomDay(),
            'view'  => $view,
            'ged'   => $tree->name(),
        ]);
    }
public function calendarUrl(string $date_format, Tree $tree): string
    {
        if ($this->day !== 0 && strpbrk($date_format, 'dDj')) {
            // If the format includes a day, and the date also includes a day, then use the day view
            $view = 'day';
        } elseif ($this->month !== 0 && strpbrk($date_format, 'FMmn')) {
            // If the format includes a month, and the date also includes a month, then use the month view
            $view = 'month';
        } else {
            // Use the year view
            $view = 'year';
        }

        return route('calendar', [
            'cal'   => $this->calendar->gedcomCalendarEscape(),
            'year'  => $this->formatGedcomYear(),
            'month' => $this->formatGedcomMonth(),
            'day'   => $this->formatGedcomDay(),
            'view'  => $view,
            'ged'   => $tree->name(),
        ]);
    }
public function calendarUrl ( string $ date_format , Tree $ tree ) : string { if ( $ this -> day !== 0 && strpbrk ( $ date_format , 'dDj' ) ) { // If the format includes a day, and the date also includes a day, then use the day view $ view = 'day' ; } elseif ( $ this -> month !== 0 && strpbrk ( $ date_format , 'FMmn' ) ) { // If the format includes a month, and the date also includes a month, then use the month view $ view = 'month' ; } else { // Use the year view $ view = 'year' ; } return route ( 'calendar' , [ 'cal' => $ this -> calendar -> gedcomCalendarEscape ( ) , 'year' => $ this -> formatGedcomYear ( ) , 'month' => $ this -> formatGedcomMonth ( ) , 'day' => $ this -> formatGedcomDay ( ) , 'view' => $ view , 'ged' => $ tree -> name ( ) , ] ) ; }
Create a URL that links this date to the WT calendar

@param string $date_format
@param Tree   $tree

@return string
Create a URL that links this date to the WT calendar