How Long Until

Search tools and articles

Blog / Dates

What adding a month to 31 January should mean

How Long Until editorial · 2026-05-18

Month arithmetic is not the same as adding 30 days. This site clamps overflow to the last valid day.

Programming languages disagree about 31 January plus one month. Some throw. Some roll into March. Some land on 28 February.

How Long Until clamps: keep the day number when the destination month is long enough; otherwise use the last day of that month. So 31 January + 1 month is 28 February, or 29 February in a leap year. 31 March + 1 month is 30 April.

That rule is documented on months from today and implemented once in the calendar library, not copied into each page.

If you need “plus 30 days” instead, use days from today. Those are different questions. Mixing them is how billing cycles and “one month later” reminders drift.

Related tools

More articles