original_string: public function get_default_section_name($section) {
          if ($section->section == 0) {
              // Return the general section.
              return get_string('section0name', 'format_weeks');
          } else {
              $dates = $this->get_section_dates($section);
  
              // We subtract 24 hours for display purposes.
              $dates->end = ($dates->end - 86400);
  
              $dateformat = get_string('strftimedateshort');
              $weekday = userdate($dates->start, $dateformat);
              $endweekday = userdate($dates->end, $dateformat);
              return $weekday.' - '.$endweekday;
          }
      }
code: public function get_default_section_name($section) {
          if ($section->section == 0) {
              // Return the general section.
              return get_string('section0name', 'format_weeks');
          } else {
              $dates = $this->get_section_dates($section);
  
              // We subtract 24 hours for display purposes.
              $dates->end = ($dates->end - 86400);
  
              $dateformat = get_string('strftimedateshort');
              $weekday = userdate($dates->start, $dateformat);
              $endweekday = userdate($dates->end, $dateformat);
              return $weekday.' - '.$endweekday;
          }
      }
code_tokens: public function get_default_section_name ( $ section ) { if ( $ section -> section == 0 ) { // Return the general section. return get_string ( 'section0name' , 'format_weeks' ) ; } else { $ dates = $ this -> get_section_dates ( $ section ) ; // We subtract 24 hours for display purposes. $ dates -> end = ( $ dates -> end - 86400 ) ; $ dateformat = get_string ( 'strftimedateshort' ) ; $ weekday = userdate ( $ dates -> start , $ dateformat ) ; $ endweekday = userdate ( $ dates -> end , $ dateformat ) ; return $ weekday . ' - ' . $ endweekday ; } }
docstring: Returns the default section name for the weekly course format.
  
  If the section number is 0, it will use the string with key = section0name from the course format's lang file.
  Otherwise, the default format of "[start date] - [end date]" will be returned.
  
  @param stdClass $section Section object from database or just field course_sections section
  @return string The default value for the section name.
docstring_tokens: Returns the default section name for the weekly course format .