[PR #6450] feat: standardize date format to ISO 8601 (YYYY-MM-DD) #11913

Closed
opened 2026-02-16 18:16:51 -05:00 by yindo · 0 comments
Owner

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

State: closed
Merged: No


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

No dependencies set.

Reference: anomalyco/opencode#11913