I have just noticed that the week_start_day input in the HB Schedule to Data component has some illogical shifts depending on the day I input. I am using LBT 1.8 but also checked with version 1.10 and it’s the same.
Basically, when I try to shift the schedule, it shifts as expected Sunday-Wednesday, then does an illogical step for Thursday and Friday, then jumps back to an expected Saturday:
Sun - Wed: Shifts as expected
Thu: Same as monday
Fri: Same as tuesday
Sat: Shifts as expected
I checked the github repository for the nested functions and I found that in the _dow_test_to_int function, indeed Thursday and Friday is made into the same integers as Monday and Tuesday (2 & 3). I am guessing this a bug, or maybe I am missing something?
I have attached a small sample script, image and screenshot of the _dow_test_to_int function.
I’m a little surprised that this typo managed to fly under the radar for so long but I guess this is partly because the bug does not affect anyone’s simulations. It only has an impact on the HB Schedule to Data component like you mentioned.
I just pushed a fix that is now available with the LB Versioner:
Thanks again for reporting the issue and for finding the problem in the source code!
Awesome, thanks for the quick fix! Yes for me as I used the component to edit a schedule that I’m then writing to a .csv it impacted simulations which is how I found it, but I think it is a very specific case so it makes sense it didn’t get noticed for so long. Thanks for confirming it only impacts this particular component as I already changed it manually and I was a bit weary of breaking something else. All good!