Unfortunately, this gives the following error, so it seems you can not compare time like this:
Is there any way to make this work?2020-04-02 07:35:00.216 Error: EventSystem: Lua script error (Blockly), Name: Curtains_2 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: ')' expected near 'comparevariable'