ocf / ocflib

Python libraries for account and server management
https://pypi.python.org/pypi/ocflib
Other
15 stars 32 forks source link

Add support for null/closed hours #246

Closed Boomaa23 closed 2 years ago

Boomaa23 commented 2 years ago

Adds support for closing the lab for the entire day regularly (such as the current situation with MLK being closed on Sundays). More info: https://github.com/ocf/etc/pull/250#issuecomment-903232452

To close for a day, edit etc/hours.yaml to something like the following (this example would close Sunday):

regular:
  ...
  Satuday:
    - ['11:00', '18:00']
  Sunday: null

The result is something that looks like the following (note the "Closed All Day" days) hours

Boomaa23 commented 2 years ago

For reference, the following works without changing ocflib

Sunday: []

and if ocflib is changed, these would also work

Sunday:
Sunday: null

This does not work in any circumstances (unless we change it to also cover [[]])

Sunday:
  - []