Skip to content

Add ISO 8601 fallback for older Swift - #21

Open
TyceHerrman wants to merge 1 commit into
remko:mainfrom
TyceHerrman:issue-20-iso8601-fallback
Open

Add ISO 8601 fallback for older Swift#21
TyceHerrman wants to merge 1 commit into
remko:mainfrom
TyceHerrman:issue-20-iso8601-fallback

Conversation

@TyceHerrman

Copy link
Copy Markdown

Summary

  • keep Date.ISO8601Format() for Swift 6.2 and newer
  • use ISO8601DateFormatter().string(from:) with older compilers
  • preserve the generated identity format without expanding the supported toolchain policy

Swift 5.10.1's Linux corelibs Foundation does not provide Date.ISO8601Format(). The compiler guard keeps the current API on the supported Swift 6.2 path while allowing downstream legacy builds to use the portable formatter.

Closes #20

Validation

  • DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer make
  • DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer make test (105 tests)
  • strict swift-format lint over Package.swift Sources Scripts Tests
  • git diff --check
  • Nixpkgs Swift 5.10.1 builds for aarch64-linux and x86_64-linux, using this source without the downstream formatter substitution

AI disclosure: prepared with assistance from OpenAI Codex (GPT-5).

@booxter

booxter commented Jul 31, 2026

Copy link
Copy Markdown

@remko Could you please check if this patch makes sense?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use a compiler-version fallback for ISO 8601 date formatting

2 participants