-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
"@rocket.chat/message-parser": patch | ||
--- | ||
|
||
feat(message-parser): add timestamps pattern | ||
|
||
### Usage | ||
|
||
Pattern: <t:{timestamp}:?{format}> | ||
|
||
- {timestamp} is a Unix timestamp | ||
- {format} is an optional parameter that can be used to customize the date and time format. | ||
|
||
#### Formats | ||
|
||
| Format | Description | Example | | ||
| ------ | ------------------------- | --------------------------------------- | | ||
| `t` | Short time | 12:00 AM | | ||
| `T` | Long time | 12:00:00 AM | | ||
| `d` | Short date | 12/31/2020 | | ||
| `D` | Long date | Thursday, December 31, 2020 | | ||
| `f` | Full date and time | Thursday, December 31, 2020 12:00 AM | | ||
| `F` | Full date and time (long) | Thursday, December 31, 2020 12:00:00 AM | | ||
| `R` | Relative time | 1 year ago | |