diff --git a/calendar/generate_lecturedates.php b/calendar/generate_lecturedates.php index 4d35545..b3d29a7 100644 --- a/calendar/generate_lecturedates.php +++ b/calendar/generate_lecturedates.php @@ -1,14 +1,14 @@ $period_start) { $week_start = clone($period_start); @@ -134,15 +144,13 @@ $class_date = clone($week_start); $class_date->add($offset); - // Note that the toWords() method generates hyphens in the result, - // so we need to strip these out for LaTeX to be happy. Larger - // numbers may well include spaces and commas, but it's pretty - // unlikely that we'll ever get that high! - printf( "\\newcommand{\\DateWeek%sLecture%s}{%s}\n", - ucfirst( str_replace( '-', '', $numwords->toWords( $week_num ) ) ), - ucfirst( str_replace( '-', '', $numwords->toWords( $lecture_num ) ) ), - $class_date->format( 'j F' ) - ); + if ($first_lecture) { + $first_lecture = false; + } + else { + print " \\or "; + } + printf("%s%%\n", $class_date->format('j F')); $lecture_num++; } // for every class in week @@ -150,3 +158,18 @@ $week_num++; } // for every week in period } // for every period + +print <<