code: protected function add_date_links()
      {
          $year = \get_query_var('year', (int)\date('Y'));
          $month = \get_query_var('monthnum', 1);
          $day = \get_query_var('day', 1);
  
          $timestamp = \strtotime("{$year}-{$month}-{$day}");
  
          $year_args = ["{$year}", \get_year_link($year)];
          $month_args = [
              \date('M Y', $timestamp),
              \get_month_link($year, $month)
          ];
          $day_args = [
              \date('d M Y', $timestamp),
              \get_day_link($year, $month, $day)
          ];
  
          if ($this->page->is('year')) {
              $this->links[] = $this->currentLink(...$year_args);
          } else {
              $this->links[] = $this->makeLink(...$year_args);
          }
  
          if ($this->page->is('month')) {
              $this->links[] = $this->currentLink(...$month_args);
          }
  
          if ($this->page->is('day')) {
              $this->links[] = $this->makeLink(...$month_args);
              $this->links[] = $this->currentLink(...$day_args);
          }
      }
docs: Called if $page === 'date'