Skip to content

fix(opencode): standardize date format to ISO 8601#3

Merged
aniasse merged 1 commit intodevfrom
fix/iso-8601-date-format-v2
Feb 27, 2026
Merged

fix(opencode): standardize date format to ISO 8601#3
aniasse merged 1 commit intodevfrom
fix/iso-8601-date-format-v2

Conversation

@aniasse
Copy link
Owner

@aniasse aniasse commented Feb 27, 2026

Issue

Closes anomalyco#12398

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Standardizes date format to ISO 8601 (YYYY-MM-DD) using en-CA locale. This resolves ambiguity between MM/DD/YYYY (US) and DD/MM/YYYY (European) formats.

Changes

  • Updated Locale.datetime() in packages/opencode/src/util/locale.ts to use en-CA locale instead of system default
  • This ensures consistent, sortable, and unambiguous date output

Benefits

  • Consistency: International standard ISO 8601
  • Sortability: Lexicographically sortable
  • Clarity: No ambiguity between US and European formats
  • Interoperability: Better for APIs and data exchange

How did you verify my code works?

  • Verified date output format is now YYYY-MM-DD
  • Tested locally using Node.js toLocaleDateString with en-CA locale

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Use en-CA locale to ensure consistent YYYY-MM-DD output
This resolves ambiguity between MM/DD/YYYY and DD/MM/YYYY formats

Fixes anomalyco#12398
@aniasse aniasse merged commit 720cf33 into dev Feb 27, 2026
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.

feat: standardize date format to ISO 8601

1 participant