Skip to content

business_days.after weird behaviour when not in workday and out of business hours. #197

Description

@jgmontoya

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions