FA-59633 / Subscription proration billing / Member archive
Annual plan proration across leap years: range start clip · case 03
Ranges that begin before the term start are billed for days outside the term.
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 fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression 0 | [365, 4512] | [365, 2908] | 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 ↗