[PR #7065] feat: use ISO 8601 date format #12230

Open
opened 2026-02-16 18:17:09 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/7065

State: open
Merged: No


Closes #12401

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

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/7065 **State:** open **Merged:** No --- Closes #12401 ## 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
yindo added the pull-request label 2026-02-16 18:17:09 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12230