Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 29, 2025

Task: Align all time formatting options

Based on PR #22339, this task aims to complete the work to add customizable time format options for relative time display across the frontend.

Plan:

  • Add format parameter support to relativeTime() function in src/common/datetime/relative_time.ts (narrow, short, long styles)
  • Update TIMESTAMP_RENDERING_FORMATS to include relative_narrow and relative_short
  • Add format property to ha-relative-time component
  • Update hui-timestamp-display component to support new formats
  • Add format property to state-display component
  • Update badge and tile card configs to include format option
  • Update editor structs for tile-card and entity-badge
  • Update all tests to handle new optional format parameter
  • Ensure all places using timestamp display components can pass format through
  • Run linting and tests to ensure no regressions

Key changes from PR #22339:

  • Use format as the property name (not time_verbosity)
  • Support relative, relative_narrow, relative_short as format options
  • Pass format through component hierarchy properly
  • Keep backwards compatibility (default to relative / long style)
Original prompt

Create a task to finish the work started in #22339 and align all the time formating options


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

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.

3 participants