RocketChat / RocketChat/Rocket.Chat
allow setting date/time formats via date/time format strings
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:

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

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:

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

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:

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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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