original_string: public function get_section_dates($section, $startdate = false) {
  
          if ($startdate === false) {
              $course = $this->get_course();
              $startdate = $course->startdate;
          }
  
          if (is_object($section)) {
              $sectionnum = $section->section;
          } else {
              $sectionnum = $section;
          }
          $oneweekseconds = 604800;
          // Hack alert. We add 2 hours to avoid possible DST problems. (e.g. we go into daylight
          // savings and the date changes.
          $startdate = $startdate + 7200;
  
          $dates = new stdClass();
          $dates->start = $startdate + ($oneweekseconds * ($sectionnum - 1));
          $dates->end = $dates->start + $oneweekseconds;
  
          return $dates;
      }
code: public function get_section_dates($section, $startdate = false) {
  
          if ($startdate === false) {
              $course = $this->get_course();
              $startdate = $course->startdate;
          }
  
          if (is_object($section)) {
              $sectionnum = $section->section;
          } else {
              $sectionnum = $section;
          }
          $oneweekseconds = 604800;
          // Hack alert. We add 2 hours to avoid possible DST problems. (e.g. we go into daylight
          // savings and the date changes.
          $startdate = $startdate + 7200;
  
          $dates = new stdClass();
          $dates->start = $startdate + ($oneweekseconds * ($sectionnum - 1));
          $dates->end = $dates->start + $oneweekseconds;
  
          return $dates;
      }
code_tokens: public function get_section_dates ( $ section , $ startdate = false ) { if ( $ startdate === false ) { $ course = $ this -> get_course ( ) ; $ startdate = $ course -> startdate ; } if ( is_object ( $ section ) ) { $ sectionnum = $ section -> section ; } else { $ sectionnum = $ section ; } $ oneweekseconds = 604800 ; // Hack alert. We add 2 hours to avoid possible DST problems. (e.g. we go into daylight // savings and the date changes. $ startdate = $ startdate + 7200 ; $ dates = new stdClass ( ) ; $ dates -> start = $ startdate + ( $ oneweekseconds * ( $ sectionnum - 1 ) ) ; $ dates -> end = $ dates -> start + $ oneweekseconds ; return $ dates ; }
docstring: Return the start and end date of the passed section
  
  @param int|stdClass|section_info $section section to get the dates for
  @param int $startdate Force course start date, useful when the course is not yet created
  @return stdClass property start for startdate, property end for enddate
docstring_tokens: Return the start and end date of the passed section