FAILURE MAP
← Case archive

FA-59629 / Subscription proration billing / Member archive

Annual plan proration across leap years: term length · case 04

Terms that include Feb 29 prorate at a daily rate that sums to more than the annual price.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

Case contract

Input {price, start (annual term start), from, to (exclusive)}. The term is [start, same date next year); a Feb 29 start ends on Mar 1. The requested range is clipped to the term; days = max(0, clipped length). Amount = price*days/term_days half-up. Return [term_days, amount].

Why this case matters

Annual terms have 365 or 366 days depending on whether they contain Feb 29, which changes the daily rate.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression 0[365, 5214][366, 5200]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 ↗