星河欲转 vor 1 Woche
Ursprung
Commit
392f20ce91
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      resources/CQU/cqu.js

+ 2 - 2
resources/CQU/cqu.js

@@ -49,8 +49,8 @@ const parseSchedule = (startDate, maxWeek, timeSlots, schedule) => ({
         teacher: course.instructorName?.slice(0, course.instructorName?.indexOf('-')) ?? '',
         position: course.position ?? course.roomName ?? '',
         day: course.weekDay ?? 0,
-        startSection: (course.periodFormat?.indexOf('-') ?? 0) > 0 ? (Number(course.periodFormat?.split('-')[0]) + 1) : (Number(course.periodFormat) + 1) ?? 0,
-        endSection: (course.periodFormat?.indexOf('-') ?? 0) > 0 ? (Number(course.periodFormat?.split('-')[1]) + 1) : (Number(course.periodFormat) + 1) ?? 0,
+        startSection: (course.periodFormat?.indexOf('-') ?? 0) > 0 ? (Number(course.periodFormat?.split('-')[0])) : (Number(course.periodFormat)) ?? 0,
+        endSection: (course.periodFormat?.indexOf('-') ?? 0) > 0 ? (Number(course.periodFormat?.split('-')[1])) : (Number(course.periodFormat)) ?? 0,
         weeks: (course.teachingWeek ?? '').split('').map((char, index) => (char === '1' ? index + 1 : null)).filter(week => week !== null),
     })),
 });