Skip to content

Forced workdays#182

Open
pustserg wants to merge 2 commits into
bokmann:developfrom
pustserg:forced_workdays
Open

Forced workdays#182
pustserg wants to merge 2 commits into
bokmann:developfrom
pustserg:forced_workdays

Conversation

@pustserg

@pustserg pustserg commented May 5, 2018

Copy link
Copy Markdown

Sometimes because of the holidays (at least in Russia), working days for the weekend can be moved back.
For example, because of the holiday on May 1, Saturday April 29 was a working day despite the fact that the 5-day working week was in the config.
date.workday? method returned false for this date. I want to be able to specify "forced_workdays" for such cases.
It works like a holidays option

workday = Date.parse("2018-4-29")
BusinessTime::Config.forced_workdays << workday

or for YAML config

business_time:
  forced_workdays:
    - April, 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant