FAILURE MAP
← Case archive

FA-293 / Calendar arithmetic / Member archive

Adding a calendar month drifts past the target month · case 03

A month offset expressed as thirty days lands on the wrong date, or a blanket day cap loses valid month-end days.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Given a valid ISO calendar date and an integer month offset, return an ISO date in the destination month, keeping the original day when possible and otherwise clamping once to the last day. Supported results stay within years 1 through 9999.

Why this case matters

Billing dates and calendar schedules need an explicit month-end convention. Calendar movement is not equivalent to adding elapsed days or repeatedly applying a one-month clamp.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
January end clamps to actual February"2022-03-02""2022-02-28"Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗