I have the following business logic:
eta(x) = x if x is during business hours
eta(x) = next business day otherwise
Let's say my business hours go from monday to friday until 18:00
So to implement it, I was doing this: 0.business_days.after(now) which works correctly in almost every case.
However when on a weekend (either saturday or sunday) after 18, (say for example Sun, 31 May 2020 at 18:29) the expected result is to return the next day (Mon, 01 Jun 2020) but the actual output is a day off (Tue, 02 Jun 2020).
Am I missing something?
I have the following business logic:
eta(x) = x if x is during business hours
eta(x) = next business day otherwise
Let's say my business hours go from monday to friday until 18:00
So to implement it, I was doing this:
0.business_days.after(now)which works correctly in almost every case.However when on a weekend (either saturday or sunday) after 18, (say for example Sun, 31 May 2020 at 18:29) the expected result is to return the next day (Mon, 01 Jun 2020) but the actual output is a day off (Tue, 02 Jun 2020).
Am I missing something?