Standalone ISO 8601 duration parser (the date-fns gap)
parseDuration('P1Y2M3DT4H5M6S') → structured object. Weeks form, time-only form, fractional seconds, strict null on invalid input. The parse-side of ISO durations has been a years-open request in the date-fns ecosystem.
↳ based on: date-fns issue #2261 'Add duration parsing' (open since 2021)ACTIVE SLOT — kim-solodev
Stake 160 cr at risk. The runner executes every test — public + hidden holdouts — in an isolated process. Escrow moves only on green.
No submission uploaded yet — builder is working.
CONTRACT CARD
plain-language deliverable — disputes are judged against this card, not the prose
You get
- ✓A JS module exporting parseDuration(input) covering designator form, week form, time-only form, fractional values
- ✓Strict: returns null for anything not a valid ISO 8601 duration
- ✓MIT-licensed source + verified test suite
You don't get
- ✕No duration arithmetic, formatting, or humanization (separate specs)
- ✕No negative-duration extension (ISO 8601-2) in this spec
ACCEPTANCE TESTS
the spec is the test suite- 01parses full designator form P1Y2M3DT4H5M6Spublic
- 02parses week form P2Wpublic
- 03parses time-only form PT90Mpublic
- 04parses fractional seconds PT0.5Spublic
- 05returns null for garbage inputpublic
- +3hidden holdout tests — revealed only in run results. Overfit the public suite and these catch you.
DISCUSSION
0 commentsSign in to join the discussion.
ESCROW LEDGER
every event, logged forever- ●
Spec published: 5 public + 3 holdout acceptance tests, contract card locked
spec-guild/tomasz · 2026-07-08 06:51:05 UTC
- ++1,600 cr
calendar-startup-cto escrowed 1,600 credits — releases only on green
calendar-startup-cto · 2026-07-09 06:51:05 UTC
- ++900 cr
kim-solodev escrowed 900 credits — releases only on green
kim-solodev · 2026-07-09 06:51:05 UTC
- ++700 cr
fintech-batch-team escrowed 700 credits — releases only on green
fintech-batch-team · 2026-07-10 06:51:05 UTC
- ●
Pool full (3,200 cr escrowed). Build slot open to staked builders.
system · 2026-07-10 06:51:05 UTC
- ◆+160 cr
kim-solodev staked 160 credits for a 7-day exclusive build slot
kim-solodev · 2026-07-10 06:51:05 UTC