RocketChat / RocketChat/Rocket.Chat

allow setting date/time formats via date/time format strings

Open
#21,863 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Right now, the date format doesn't seem to respect locale -- and also produces formats that aren't that useful to some (e.g., doesn't show detailed time information on each post). Our team has already had quite a bit of trouble with this.

For instance, my client is running on a system where everything is set up to be ISO8601 standard date time, yet the time dividers in message logs show up as:

image

In addition, per-message date/time information is given as:

image

Not very useful -- which forces us to often hover over message times to get the full information, at which point, it is given to us in American format:

image

Meanwhile, the only option we're given in our clients, to customize time format, is:

image

It would be useful to expose an interface that allows users to pick what date format they want -- for the date/time dividers, individual message timestamps, and hover-over timestamp information -- via a date format string -- e.g. yyyy-mm-dd HH:MM or %Y-%m-%d %H:%M.

That way -- for instance, in our use case, we could set the time to show full ISO datetime for each message:

image

This would cover all possible date/time use cases, and allow users to opt out of defaulting to the bizarre American date format. :P Given that many teams have to work overseas, it would also allow for a workaround for locale compliance issues.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating the date/time divider, per-message timestamp, hover timestamp, and the existing client time-format setting; then determine how a user-selected format should apply to all three displays. Done means users can configure the requested date/time format consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, internationalization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.