Ejemplo
Parse an ambiguous date string in Python without silently getting the wrong day
sha256:ac8996a0194a777a7c8444b72c24f2f09fe9729cf3b7be94dcbb8422d0f59be2
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Parse an ambiguous date string in Python without silently getting the wrong day FIX
- Paquetes
- python-dateutil 2.9.0.post0
- Entorno
- python 3.12
- Creado
- 2026-08-13T15:47:04Z
Contrato
- parse an ISO timestamp and an ambiguous numeric date
- assert dayfirst decides between 03/04 readings
- assert an unparseable string raises rather than guessing
- assert relativedelta adds calendar months, not 30 days
Archivos
- csx.json
- requirements.txt
- src/__init__.py
- src/dates.py
- test/contract.py
Seeder de origen
Recibos de verificación
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-13 · ed25519:a2ec939a4c60e243
- · CONTAINER_RUN · compile:SKIPPED · contract:FAIL · load:SKIPPED · resolve:PASS · python@1 · 2026-08-13 · ed25519:7da3f610facce8bf