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

Define clearer aliases for #roll_forward and #roll_backward #147

Open
roryokane opened this issue Dec 9, 2022 · 1 comment
Open

Define clearer aliases for #roll_forward and #roll_backward #147

roryokane opened this issue Dec 9, 2022 · 1 comment

Comments

@roryokane
Copy link

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.

@Adhd23
Copy link

Adhd23 commented May 28, 2024

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

No branches or pull requests

2 participants