Special column applies only on non-rest days
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
1 parent
63a36333fb
commit
8649d3abd0
3 files changed
+22
-9
No files matched your search
@@ -97,13 +97,15 @@ effects in their pure functions so they are unit-testable.
|
||||
### Choosing the column (schedule.py)
|
||||
|
||||
For a given date:
|
||||
1. If the date is in a `special` column's explicit dates → that column.
|
||||
1. If the date is not a rest day and is in a `special` column's explicit dates → that column
|
||||
(the special column is workdays during school holidays, so it never applies on a
|
||||
Saturday, Sunday or state holiday).
|
||||
2. Else if it is a Saturday, Sunday or Czech state holiday → the `rest_day` column.
|
||||
3. Else → the `workday` column.
|
||||
|
||||
Among columns of the same kind, use the one with the latest `valid_from <= date`;
|
||||
if none yet applies, use the earliest. Steps 1–3 are the proposed default order
|
||||
(special date beats holiday/weekend); the user writes and may change this function,
|
||||
(a special date on a workday beats the workday column; rest days always use the rest-day column); the user writes and may change this function,
|
||||
see "User-written code" below.
|
||||
|
||||
`next_departures` looks at today's selected column from `now`, and rolls into the
|
||||
|
||||
Reference in new issue
Block a user