Skip to content

Adding one business day to Friday 9.59 is not calculated correctly #9

@nikbolotin

Description

@nikbolotin

Description

Next business day for Friday 9.59 should be Monday 09:59 but it is returned as Saturday 09:59.

const businessTime: BusinessTime = new BusinessTime(
    moment.utc('Friday 2021-10-30 09:59', TEST_FORMAT),
)

const added: BusinessTime = businessTime.addBusinessDays(1)

returns Saturday 2021-10-30 09:59.

Starting from Friday 10.00 addBusinessDays(1+) is calculated correctly

Ways to reproduce

Add ["Friday 2021-10-29 09:59", 1, "Monday 2021-11-01 09:59"], to testAddBusinessDaysDefault

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions