4 ms·
I think a lot of people here are getting hung up on the associativity, or that the name is not fully descriptive. But remember that this functionality exist ms
by underwater 5y ago
I think a lot of people here are getting hung up on the associativity, or that the name is not fully descriptive.
But remember that this functionality exist ms is a library for operating on dates. It is clear to the user that values like "2 days" or "1 month" are intermediate values that cannot or should not be used as output. They need to be applied to an absolute date to become resolved and be useful.
The context, and real world experience with dates, makes this distinction obvious.
Side note: I created a similar library in the past. I struggled more with deciding if the clipping behaviour was even desirable than worrying about the naming, but that was merely due to the API I used. My function signature was `addMonths(v, 2)`, which eliminated ambiguity.