How this calculation works
Move a date by a calendar period containing years, months, weeks and days. Unlike a fixed-day offset, a month changes the calendar month and can end on its last valid day. The order is deliberate: years and months establish the target month, the day is clamped if necessary, then weeks and days are applied.
Worked example
This example uses illustrative inputs. Your current result is shown above.
Start on 31 January 2024, choose Add, and enter 0 years, 1 month, 0 weeks and 0 days. February 2024 ends on day 29, so min(31,29) = 29 and the result is 29 February 2024.
Assumptions and limits
- Component fields are nonnegative whole numbers; the operation selector chooses the direction.
- Weeks always contain seven calendar days. Holidays and weekends are not skipped.
- End-of-month clamping can make an add followed by a subtract nonreversible; a calendar month is not a fixed 30-day duration.
Questions people ask
Why does a month added to the 31st not always end on the 31st?
If the target month has fewer days, its last valid date is used. Remaining week/day offsets are applied after that clamp.
Will subtracting the same month restore my original date?
Not always. Once clamping changes the day, the original day is no longer stored. Use a fixed day offset when exact reversibility of elapsed days is your intended operation.