opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat: standardize date format to ISO 8601 (YYYY-MM-DD)

Open scarf005 opened this issue 2 weeks ago • 0 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

scarf005 avatar Dec 30 '25 16:12 scarf005