A client-side mod which formats Discord Timestamps to your local time.
A simple client-side Minecraft mod that automatically finds and formats Discord-style timestamps in chat, converting them to your local time.
<t:1672531200> in chat messages.<<t:1672531200>> is sent in the chat, it will get replaced by a matching literal assuming it won't overflow the 256 character limit, thus visible to everyone.The mod checks incoming chat messages for timestamps like <t:TIMESTAMP:STYLE> (or <<t:TIMESTAMP:STYLE>>).
TIMESTAMP: A Unix timestamp (in seconds). You can also use the special values yesterday, now and tomorrow to represent the respective time.STYLE: An optional single character that controls the output format. If you don't provide a style, it defaults to f (Short Date/Time).| Style | Example Output | Description |
|---|---|---|
t |
14:30 |
Short Time |
T |
14:30:00 |
Long Time |
d |
31/12/2023 |
Short Date |
D |
December 31, 2023 |
Long Date |
f |
December 31, 2023 at 14:30 |
Short Date/Time (Default) |
F |
Sunday, December 31, 2023 at 14:30 |
Long Date/Time |
R |
5 minutes ago |
Relative Time |
If another player let's say in the UTC timezone sends the following message in chat:
The server event will start at <t:1704067200:F>.
And you're in the GMT+1 timezone, you'll see:
The server event will start at Monday, January 1, 2024 at 01:00.
However, if the player in UTC sends this message in chat:
My date and time is <<t:1704067200:F>>.
Everyone (even players without this mod) will see this:
The server event will start at Monday, January 1, 2024 at 01:00.
This is a Fabric mod and requires the Fabric API.
.jar file into your .minecraft/mods folder.git clone https://github.com/m3z0id/TimeFormatter.gitcd TimeFormatter./gradlew build -Pmc=<Minecraft Version> -Pyarn=<Yarn Version> -Papi=<Fabric API Version> -Padventure=<Koryo Adventure Fabric Version>.jar file will be located in the build/libs/ directory.This project is licensed under the MIT License. See the LICENSE file for more details.