Skip to content

Render Dates/Timestamps as local string #4

@mjakl

Description

@mjakl

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions