Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render Dates/Timestamps as local string #4

Open
mjakl opened this issue Nov 13, 2023 · 0 comments
Open

Render Dates/Timestamps as local string #4

mjakl opened this issue Nov 13, 2023 · 0 comments

Comments

@mjakl
Copy link
Collaborator

mjakl commented Nov 13, 2023

Currently the DQL Frontend Plugin renders anything coming from the backend as-is. This is fine for most data, but for dates and timestamps, Backstage recommends to render them formatted for the locale of the user (ADR012).

To comply with ADR012, we'd need to know that the given column is a date or timestamp and use Luxon.toLocaleString to render it accordingly.

This also pulls in the necessity to deal with null values when not all entries contain a date or timestamp, something that's currently covered by the DQL query itself (no logic on the Frontend side).

Bad

2023-11-13T14:45:43.278000000Z

Good (for German/Austrian Locale)

13.11.2023 15:45:43

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

No branches or pull requests

1 participant