business icon indicating copy to clipboard operation
business copied to clipboard

Define clearer aliases for `#roll_forward` and `#roll_backward`

Open roryokane opened this issue 2 years ago • 1 comments

Define these instance methods of Business::Calendar:

  • earliest_business_date_on_or_after – alias for roll_forward
  • latest_business_date_on_or_before – alias for roll_backward

While these names are more verbose, my team agrees that they are easier to understand.

Part of the problem with the current names roll_forward and roll_backward is that the imperative verb “roll” makes the methods sound like they will mutate the passed date, though they do not. (It’s good that they do not.)

Define these new names as aliases instead of renaming the existing methods to preserve backwards compatibility.

roryokane avatar Dec 09 '22 03:12 roryokane