Skip to content

Commit e432915

Browse files
authored
Merge pull request #184 from jmanian/develop
add BusinessTime::Config.with to readme
2 parents b920253 + f4f2b50 commit e432915

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.rdoc

+5
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ We can adjust the start and end time of our business hours
6161
BusinessTime::Config.beginning_of_workday = "8:30 am"
6262
BusinessTime::Config.end_of_workday = "5:30 pm"
6363

64+
Or we can temporarily override the configured values
65+
BusinessTime::Config.with(beginning_of_workday: "8 am", end_of_workday: "6 pm") do
66+
1.business_hour.from_now
67+
end
68+
6469
and we can add holidays that don't count as business days
6570
July 5 in 2010 is a monday that the U.S. takes off because our independence day falls on that Sunday.
6671
three_day_weekend = Date.parse("July 5th, 2010")

0 commit comments

Comments
 (0)