opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat: use ISO 8601 date format

Open scarf005 opened this issue 1 week ago • 1 comments

Summary

This PR standardizes date formatting across the codebase to use the ISO 8601 format (YYYY-MM-DD) instead of locale-dependent formats.

Changes

  • Updated Locale.datetime() in packages/opencode/src/util/locale.ts to use en-CA locale for toLocaleDateString(), which outputs dates in YYYY-MM-DD format
  • Renamed variable from localDate to isoDate for clarity

Rationale

  • Consistency: ISO 8601 is an internationally recognized standard for date representation
  • Sortability: YYYY-MM-DD format is lexicographically sortable
  • Clarity: Removes ambiguity between MM/DD/YYYY (US) and DD/MM/YYYY (European) formats
  • Interoperability: Better for data exchange and API responses

reopen of #6450 as fork got deleted

scarf005 avatar Jan 06 '26 08:01 scarf005