reazen / relude-eon

A datetime library for the ages in ReasonML
MIT License
12 stars 4 forks source link

Add YMD.addMonths #2

Closed mlms13 closed 5 years ago

mlms13 commented 5 years ago

We currently have nextMonth and prevMonth, but for consistency with other things that can be added, we should also allow you to add an arbitrary number of months.

Note that addMonths(2) will behave slightly differently than nextMonth >> nextMonth, because nextMonth clamps at each step along the way while addMonths will only clamp once at the end. nextMonth and prevMonth can be re-written to use addMonths without any change in behavior.

mlms13 commented 5 years ago

Oh, this appears to be done.