nusmods icon indicating copy to clipboard operation
nusmods copied to clipboard

Venue availability should check for lesson week

Open li-kai opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe.

When I search for venues on odd weeks, venue availability should mark classrooms that only have lessons on even weeks as free.

Describe the solution you'd like

Class schedules are given to us as strings. Parsing this would be pretty messy if we want to accommodate all edge cases, but it is reasonable to just parse even/odd weeks, and implement the search logic in https://github.com/nusmodifications/nusmods/blob/254a4df20a66fd3b60db5d41e6cace0dd8965729/website/src/utils/venues.ts#L37-L58.

Describe alternatives you've considered

Build an entire lossy parser so we can handle all the cases \o/

Additional context

https://t.me/NUSMods/11222

li-kai avatar Jan 26 '23 07:01 li-kai