Date String Portability Checker

Paste a date or timestamp string (or a whole log excerpt) and see exactly which values would be read differently — or rejected outright — by JS Date, Python and other common parsers, and why.

Processed locally in your browser. Your file is never uploaded.

How to use this calculator

  1. Paste one date string, or a longer block of text with dates embedded in it — nothing leaves your browser.
  2. Select "Check dates".
  3. Review each flagged value: what makes it ambiguous or risky, and which runtimes disagree.
  4. Use the suggested ISO 8601 rewrite where one is offered — some ambiguities genuinely can't be auto-resolved, and those are explained instead of guessed.

Assumptions

Methodology

Each date-like substring is classified by shape, then checked against the specific ways JS Date, Python and strict parsers (some SQL engines among them) are known to disagree: implicit UTC-vs-local midnight for date-only strings, local-vs-UTC interpretation for a datetime with no offset, century inference for two-digit years, and rejection of non-zero-padded components by stricter parsers. A rewrite to unambiguous ISO 8601 is offered only when the fix is unambiguously correct — never a guess.

Worked example

An ambiguous slash-separated date

Inputs: 01/02/2024

Result: Both 1 and 2 are valid months, so this could mean January 2nd or February 1st depending on the convention in use. Flagged as an error; no automatic rewrite is offered because guessing the intended order would be worse than leaving it as a visible problem.

A date-only ISO string

Inputs: 2024-01-15

Result: JS's `new Date("2024-01-15")` reads this as UTC midnight, but other languages and JS's own `new Date(year, month, day)` form read a bare date as local midnight — in a timezone behind UTC, that's a different calendar day. Flagged as a warning explaining the pitfall; already valid ISO 8601, so no rewrite is offered.

A non-padded date

Inputs: 2024-1-5

Result: JS and Python both accept this leniently, but some strict SQL date parsers reject it outright. Rewritten safely to 2024-01-05.

Practical guidance
Common mistakes

FAQs

Why is 01/02/2024 flagged as an error but 25/12/2024 only as info?

In 01/02/2024 both 1 and 2 are valid month numbers, so the order genuinely can't be determined from the string alone. In 25/12/2024, 25 can't be a month, so the order (day/month) is forced — it's still not ISO 8601, but it isn't ambiguous, so it's a lower-severity, auto-rewritable issue.

Why won't the tool just assume a two-digit year like "24" means 2024?

It very likely does, but the same string can and does mean 1924 to some systems and 2024 to others depending on the century-inference convention they implement, and this tool never silently guesses on the user's behalf when a wrong guess would be worse than no guess.

Is a date-only string like 2024-01-15 actually unsafe?

It's unsafe specifically for the moment-in-time it represents when read by JS `Date` versus most other parsers, because JS treats a bare date as UTC while most other languages treat it as local time. It's completely safe as plain text/storage — the risk only shows up once something parses it into a date object and asks what instant it represents.