CtrlK
BlogDocsLog inGet started
Tessl Logo

testland/iso-8601-vs-rfc-3339-reference

Pure-reference catalog of the ISO 8601 vs RFC 3339 distinction. Covers the relationship (RFC 3339 is a strict subset of ISO 8601 designed for internet protocols), the syntactic differences (RFC 3339 disallows ISO 8601's '+02' offset short-form requires '+02:00'; RFC 3339 mandates a date-time separator T or space; ISO 8601 allows much more), the canonical date-time string format (YYYY-MM-DDTHH:MM:SS[.fff]±HH:MM or Z), per-language parser behaviour (Python isoformat, Java Instant.parse, JS Date.parse non-spec), and serialisation rules for APIs. Use when choosing a wire format, parsing third-party datetimes, or auditing time-string handling.

76

Quality

95%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

parser-support.mdreferences/

Per-language parser support and anti-patterns

Parser-support matrix, version notes, and the anti-pattern table extracted from the core reference. The canonical format, forbidden forms, serialisation rules, pitfalls, and testable behaviours stay in SKILL.md.

Per-language parser support

LanguageRFC 3339 strictISO 8601 fullTolerance
Python datetime.fromisoformatyespartialAccepts most RFC 3339
Python dateutil.parseryesmostly yesLenient
Java Instant.parseyes (RFC 3339 + Z)noStrict ISO 8601 subset
Java OffsetDateTime.parseyesmostly yesLenient
JavaScript Date.parseplatform-dependentNONon-spec; varies by browser
Rust chronoyespartialLenient
Go time.Parse(time.RFC3339, ...)yesnoStrict
.NET DateTimeOffset.Parseyesmostly yesLenient

JavaScript Date.parse is the worst. Per developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse: "implementation-specific... The exact behavior of this function varies between implementations." Use a library (date-fns, dayjs) or the Temporal proposal where available.

Version notes

  • Python datetime.fromisoformat: full RFC 3339 (including a trailing Z) only from 3.11; earlier versions reject Z.
  • Go: time.RFC3339 rejects fractional seconds; use time.RFC3339Nano for fractional.
  • Temporal is a proposal; availability varies by runtime.

Anti-patterns

Anti-patternWhy it failsFix
Date.parse('2026-05-20') in JSImplementation-dependent (browser-local? UTC?)Use a library; specify offset
Mix UTC and local-with-offset in same fieldSortability broken; consumer confusionPick one wire format
Skip the offset (2026-05-20T14:30:00)AmbiguousAlways offset
Storing local-format stringsLose tz info; can't reconstructStore UTC + zone name separately if local matters
4-digit milliseconds (2026...000)Not all parsers acceptUse 3 (milli) or 6 (micro) digits
Sub-second precision but UTC stringLose subsec on round-trip in some librariesTest the round-trip
Trusting Date.parse('5/20/2026')US format; ambiguousUse RFC 3339 always
Date-only without explicit timeReceiver-defined behaviourSpecify T00:00:00Z or document

SKILL.md

tile.json