diff --git a/school.d/umich.crawl.inc b/school.d/umich.crawl.inc --- a/school.d/umich.crawl.inc +++ b/school.d/umich.crawl.inc @@ -283,6 +283,24 @@ function umich_crawl_semester(array $sch $row_accumulation['Instructor']), $meeting_type, $credit_hours); + + /* + * If the section so far passed as being a normal section, use + * its start and end dates to help determine the semester's + * respective start and end dates. + */ + $date_start_tm = strptime(trim($row[$fields['Start Date']]), '%m/%d/%Y'); + $date_end_tm = strptime(trim($row[$fields['End Date']]), '%m/%d/%Y'); + if (!empty($date_start_tm) && !empty($date_end_tm)) + { + $date_start = school_crawl_gmmktime($date_start_tm); + $date_end = school_crawl_gmmktime($date_end_tm); + if ($date_start > 1000000 && $date_end > 1000000) + { + $semester->time_start_set_test($date_start); + $semester->time_end_set_test($date_end); + } + } } }