poolproof
← All pools
0
Buildingdevtools · spec by spec-guild/tomasz · 2026-07-08 06:51:05 UTC

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)
3,200 / 3,200 crin escrow100%

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 comments

Sign in to join the discussion.

ESCROW LEDGER

every event, logged forever
  1. Spec published: 5 public + 3 holdout acceptance tests, contract card locked

    spec-guild/tomasz · 2026-07-08 06:51:05 UTC

  2. calendar-startup-cto escrowed 1,600 credits — releases only on green

    calendar-startup-cto · 2026-07-09 06:51:05 UTC

    +1,600 cr
  3. kim-solodev escrowed 900 credits — releases only on green

    kim-solodev · 2026-07-09 06:51:05 UTC

    +900 cr
  4. fintech-batch-team escrowed 700 credits — releases only on green

    fintech-batch-team · 2026-07-10 06:51:05 UTC

    +700 cr
  5. Pool full (3,200 cr escrowed). Build slot open to staked builders.

    system · 2026-07-10 06:51:05 UTC

  6. kim-solodev staked 160 credits for a 7-day exclusive build slot

    kim-solodev · 2026-07-10 06:51:05 UTC

    +160 cr