This is a suggestion for a minor improvement to the options for the advance method.
When dealing with time/date classes, the individual parts are usually referred to in the singular (year, month, day).
The advance method requires them to be in the plural.
It’s very easy to make the singular/plural mistake and write something like Time.zone.now.advance(month: 1) and not realize that’s a no-op because we don’t validate the keys.
A simple solution might be to validate the keys, similar to key validation in other methods:
options.assert_valid_keys(:years, :months, :weeks, :days, :hours, :minutes, :seconds)
Another option might be to pluralize all the options (accept year or years, etc.) but the key validation itself would achieve the result I was hoping for (guide the user to the correct keys)
Happy to do the work on this if there’s interest; this is something I’ve only run into once or twice before but tracing it (especially if there are no tests).
Admittedly, this isn’t something I’ve seen often, but there are live examples on github of what might be singular options for year, month, day and hour in what looks like rails/activesupport projects (A few that I scanned definitely are)
