opencode
opencode copied to clipboard
feat: use ISO 8601 date format
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()inpackages/opencode/src/util/locale.tsto useen-CAlocale fortoLocaleDateString(), which outputs dates in YYYY-MM-DD format - Renamed variable from
localDatetoisoDatefor 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