Skip to content

Conversation

@khiga8
Copy link
Contributor

@khiga8 khiga8 commented Nov 25, 2025

Based on feedback, this PR updates the format when users prefer absolute time, to provide more contextual information for recent dates:

  • Replace the date with localized "Today" when the timestamp is today
  • Omit the current year from dates

This was a decision based upon user feedback.

Approach

The desired format Today, 2:34 PM EDT isn't natively supported by Intl.DateTimeFormat, so this PR combines:

  1. Localized "Today" string (via RelativeTimeFormat)
  2. Localized time format (via DateTimeFormat)

Assumptions & trade-offs

This approach assumes:

  • The order "Today" then the time, is universally reasonable across locales.
  • Combining localized "Today" and localized time produces acceptable formatting across locales.
  • Space is an acceptable separator across locales.

Alternative considered

Hard-coding this custom format for English-only, but feels unideal/inconsistent to special-case a format for english-only.

Examples

English:

Today, 2:34 PM EDT          (en-US, today)
Dec 24, 2:34 PM EDT         (en-US, this year)
Dec 24, 2024, 2:34 PM EDT   (en-US, past year)

TBD

  • Is space an acceptable separator between "Today" and time across locales?

@khiga8 khiga8 requested a review from a team as a code owner November 25, 2025 04:37
@khiga8 khiga8 requested review from Copilot and zaataylor and removed request for Copilot November 25, 2025 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants