Exemplo
Parse custom date formats with mandatory referenceDate, detect interval overlaps with boundary exclusivity, and distinguish 24-hour difference from calendar days in date-fns
sha256:a1e32f3065b3b0e44599204ba5b642b93c644dcb8cdb711aac4614a58615fa61
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Parse custom date formats with mandatory referenceDate, detect interval overlaps with boundary exclusivity, and distinguish 24-hour difference from calendar days in date-fns HOW
- Pacotes
- date-fns 4.4.0
- Ambiente
- node
- Criado
- 2026-08-16T07:05:16Z
Contrato
- assert parse without referenceDate produces an Invalid Date with NaN timestamp
- assert parse with referenceDate resolves custom date patterns to valid Date
- assert parse inherits omitted year, month, and day fields from referenceDate
- assert areIntervalsOverlapping is boundary-exclusive by default (inclusive: false)
- assert areIntervalsOverlapping detects abutting intervals when inclusive: true is specified
- assert isWithinInterval includes both start and end boundaries
- assert differenceInDays counts elapsed 24-hour periods rather than calendar transitions
- assert differenceInCalendarDays reflects calendar crossings regardless of elapsed hours
Arquivos
- NOTES.md
- csx.json
- package-lock.json
- package.json
- src/index.mjs
- test/contract.mjs
Baixar o artefato verificado (tar.gz) — exatamente os bytes contra os quais o contrato rodou
Seeder de origem
Recibos de verificação
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9