Compliance cases

These are the 437 inputs a submission must parse. Each output must match the expected text byte for byte. You can run the suite without reading it, or open any case to see its input and expected output.

All three formats in RFC 9110 §5.6.7: IMF-fixdate, the obsolete RFC 850 form with its two-digit year, and ANSI C asctime. Matching is strict: exact case, single spaces, ASCII digits, the weekday must be the date's, and impossible dates, hour 24 and leap seconds are rejected, across the proleptic Gregorian years 0000 to 9999. The compliance suite has 80,281 lines: every HTTP-date the RFCs show, the tests of Go's net/http, Rust's httpdate, curl, Django and CPython's http.cookiejar pinned by commit, every month, weekday and two-digit year, leap rules, month ends, 32-bit limits, near-miss names and digits, and seeded random lines. An RFC 9110 parser, Python's datetime and V8 agree on every answer.

Run the full compliance suite locally. Replace your-component.wasm with your compiled component. Download the suite

curl -fLo parse_http_date.comply.wasm https://calculated.world/comply/parse_http_date.wasm
npx qipok your-component.wasm --suite parse_http_date.comply.wasm
Clear

10 of 437 cases

Case Name Expected Note Size
000001 rfc9110-examples Focused regression 784111777␊784111777␊784111777␊ The three RFC 9110 §5.6.7 examples for 784111777 3 lines
000002 epoch-and-extremes Focused regression -62167219200␊-62162078400␊-62135596800␊-1␊0␊2147… Proleptic Gregorian extremes and Y2038 boundary 10 lines
000003 all-months-imf Focused regression 1705280523␊1707962646␊1710471969␊1713154092␊1715… 12 lines
000006 all-weekdays-imf Focused regression 1704067200␊1704153600␊1704240000␊1704326400␊1704… 7 lines
000020 time-of-day-edges Focused regression -86400␊-86400␊-86399␊-86399␊-82801␊-82801␊-43200… 84 lines
000022 full-batch-2000 Focused regression 0␊34304833␊68436866␊102741699␊136960132␊17126490… 2,000 dates in one call (60,000 bytes) 2,000 lines
000025 max-input Focused regression -62167219200␊-62132828333␊-62098783066␊-62064478… Exactly 65,536 bytes: 2,184 dates and one invalid line 2,185 lines
000026 max-input-longest-output Focused regression -62167219200␊-62167219200␊-62167219200␊-62167219… Exactly 65,536 bytes of the longest timestamp, -62167219200 2,185 lines
000030 go-parse-time Go’s net/http tests invalid␊invalid␊invalid␊784111777␊784111777␊7841… Go net/http's ParseTime tests. The answers match on every line. 6 lines
000031 httpdate-tests Rust httpdate’s tests 784111777␊784111777␊784111777␊1475419451␊invalid… The Rust httpdate crate's tests. The answers match on every line. 19 lines

Where these rules come from

RFC 9110 §5.6.7 defines HTTP-date in three forms: IMF-fixdate, the obsolete RFC 850 form and ANSI C asctime. Two-digit years use RFC 6265 §5.1.1’s fixed pivot, so the answers never depend on the clock. Every answer is agreed by a direct reading of the ABNF and by Python’s datetime; the suite’s own tests add V8’s Date#toUTCString. Of the 80,281 lines, 9,435 are valid.

Cases from other parsers’ tests list what each parser says beside every line. Where a parser accepts more than RFC 9110 allows, or reads a line differently, the case says why.