Time class by adding a
next_business_day method, which takes the amount of business days as a parameter.
active_support gem will be helpful for ‘navigating’ days, e.g.
To make things clear, this test case should pass:
- Say you want to find the 1000th business day, it is not optimal to call
Time#tomorrowmore than 1000 times. Optimization on that one might fit another quiz question of a harder difficulty level!
- Introductory article about ‘telling time in Ruby’, where the
chronicgem is mentioned, which allows you do to stuff like
Chronic.parse('3 months ago this friday at 3:45pm')