Skip to content

Commit

Permalink
Merge pull request #184 from jmanian/develop
Browse files Browse the repository at this point in the history
add BusinessTime::Config.with to readme
  • Loading branch information
rmm5t authored Nov 23, 2021
2 parents b920253 + f4f2b50 commit e432915
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ We can adjust the start and end time of our business hours
BusinessTime::Config.beginning_of_workday = "8:30 am"
BusinessTime::Config.end_of_workday = "5:30 pm"

Or we can temporarily override the configured values
BusinessTime::Config.with(beginning_of_workday: "8 am", end_of_workday: "6 pm") do
1.business_hour.from_now
end

and we can add holidays that don't count as business days
July 5 in 2010 is a monday that the U.S. takes off because our independence day falls on that Sunday.
three_day_weekend = Date.parse("July 5th, 2010")
Expand Down

0 comments on commit e432915

Please sign in to comment.