Skip to content

Feature: uui-time-ago #143

Open
Open
@nielslyngsoe

Description

@nielslyngsoe

This component shall make it easy to display when something occurred. For shorter periods it will be precise and as time passes the precision will decrease.

A tooltip appearing on hover (For A11Y it might appears on focus or the tooltip can be opened by interaction/keyboard), The tooltip should display the exact time of the occurrence, as full DateTime string, like 1. January 2022 16:04:34

Examples of different appearances depending on the time since the given date-time:

now
28 seconds ago
16 minutes ago
3 hours ago
yesterday
4 days ago
last month
2 months ago
1 year ago
24 years ago

This should preferably update runtime, meaning example the second's display will update every second, to match the exact time difference.

I´m not sure how to determine when it makes sense to write yesterday etc. It would seem weird to write yesterday for 23:59 viewed at 00:01 (2minuts after). There should be a certain threshold before writing such. This has to be clarified how a system like that can work, if it does not make sense to use the words "yesterday"/"last month" then that should be kept out.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions