code: protected function localizedDayOfWeek($dayOfWeek)
      {
          if (class_exists('\IntlDateFormatter')) {
              $date = new \DateTime('2017-01-01'); // Starts sunday
              $date->modify('+' . $dayOfWeek . ' days');
  
              $formatter = \IntlDateFormatter::create(
                  $this->localeProvider->getCurrentLocale(),
                  \IntlDateFormatter::NONE,
                  \IntlDateFormatter::NONE,
                  $date->getTimezone(),
                  null,
                  'eeee'
              );
  
              return $formatter->format($date->getTimestamp());
          }
  
          return [
                     1 => 'Monday',
                     2 => 'Tuesday',
                     3 => 'Wednesday',
                     4 => 'Thursday',
                     5 => 'Friday',
                     6 => 'Saturday',
                     7 => 'Sunday',
                 ][$dayOfWeek];
      }
docs: Returns the localized day of week.
  
  @param int $dayOfWeek
  
  @return string