Skip to content

Commit

Permalink
Merge pull request #283 from pinwheeeel/develop
Browse files Browse the repository at this point in the history
school does not start on a weekend
  • Loading branch information
pinwheeeel authored Oct 6, 2024
2 parents 06b6105 + c68ac4e commit 623a89d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/models/course.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ def day_num(self, target_date=None):
"calendar_days": self.__day_num_calendar_days,
}
target_date = utils.get_localdate(date=target_date, time=[23, 59, 59])
if not self.is_current(target_date.date()):
if (
not self.is_current(target_date.date()) or target_date.weekday() >= 5
): # TODO: check for pa days
return None
return methods[tf.get("day_num_method", "consecutive")](tf, target_date)

Expand Down

0 comments on commit 623a89d

Please sign in to comment.