- Home
- Date & Calendar Math
- Add / Subtract Calendar Time
Add / Subtract Calendar Time
Add or subtract calendar time from a date. Choose calendar units (which respect month length) or fixed days (which never do), and pick how a target day that doesn't exist in the resulting month should be handled.
Worked example
January 31, 2027 plus 1 calendar month constrains to February 28 (February has no 31st). The same date in 2028 (a leap year) plus 1 month gives February 29, since that month has 29 days that year. Adding 30 fixed days instead, regardless of month length, to January 31, 2027 lands on March 2.
Constrain versus preserve end-of-month
Both rules only differ when the base date is itself the last day of its month. Constrain always lands on the resulting month's last valid day for an out-of-range target. Preserve end-of-month goes further: it keeps the result on the last day of its month even across a chain of additions, so a monthly end-of-month schedule stays anchored to month-end throughout, not just on the first step.
Limitations
This is calendar arithmetic only; it does not determine a contractual or billing due date.
Frequently asked questions
- What's the difference between calendar months and fixed days?
- A calendar month respects the target month's actual length; a fixed number of days always moves the same distance regardless of which months it crosses.