FA-59639 / Subscription proration billing / Member archive
Annual plan proration across leap years: exclusive range end · case 04
Every prorated range is billed one day too many.
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, 46646] | [365, 46318] | 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 ↗