Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forced workdays #182

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Forced workdays #182

wants to merge 2 commits into from

Conversation

pustserg
Copy link

@pustserg pustserg commented May 5, 2018

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