Relative timestamps (<t:…:R>) show wrong direction and size past ~4 weeks ("in 0 months" for a date 2 years ago)
Maintainer antworten meist innerhalb von 1 Tag
@MuhammadFaizan-prog arbeitet bereits daran.
Seit 14.11.2026.
- #1426 von @MuhammadFaizan-prog — offen
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- javascript
- Bereich
- frontend
Rechercherichtung
Read timeAgo in packages/markups/src/elements/TimestampElement.js; the seconds-through-weeks branches are correct, so focus on the months and years branches that subtract only getMonth() / getFullYear() and lose the sign. Run the existing markup tests for TimestampElement with the four examples from the issue (36 days, 13 months, exactly 2 years, 66 days future) to confirm the failures before changing the elapsed-month calculation and rounding. Note that pull request #1426 is already open against this issue, so check its state before starting.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Description:
Relative timestamp markup (<t:UNIX:R>) is rendered by timeAgo in packages/markups/src/elements/TimestampElement.js. Seconds through weeks are derived from the elapsed time, but months and years are computed by subtracting only the calendar month and year numbers (getMonth() / getFullYear()). Once a timestamp is 4+ weeks away, the result ignores the year and gets the wrong sign across New Year:
- 36 days ago (Dec 20 viewed on Jan 25) → "in 11 months"
- 13 months ago → "1 month ago"
- exactly 2 years ago (same calendar month) → "in 0 months"
- 66 days in the future (Jan 20 viewed on Nov 15) → "10 months ago"
Steps to reproduce:
- During November 2026, send a message containing
<t:1731672000:R>(Nov 15 2024). - Send
<t:1760529600:R>(Oct 15 2025) and<t:1768867200:R>(Jan 20 2027). - Look at the rendered timestamps in EmbeddedChat.
Expected behavior:
"2 years ago", "1 year ago" and "in 2 months".
Actual behavior:
"in 0 months", "1 month ago" and "10 months ago".
- Vorherrschende Sprache
- JavaScript
- Sterne
- 170
- Forks
- 397
- Ø Merge
- 12 T. 14 Std.
- Gemergte PRs (30 T.)
- 6
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus RocketChat/EmbeddedChat
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
RocketChat/EmbeddedChat#1429 ·
Maintainer antworten meist innerhalb von 1 Tag
-
docs: README says Node 22 is required, but .nvmrc pins v24 and preinstall enforces itEvtl. vergeben @Veerpratapgupta hat das vor 29 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
RocketChat/EmbeddedChat#1377 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
test: isMessageSequential in layout_editor has no coverageEvtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
RocketChat/EmbeddedChat#1373 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Permissions change-detection in useFetchChatData is dead — applyPermissions re-runs on every callEvtl. vergeben @yash113gadia hat das vor 166 Tagen übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
RocketChat/EmbeddedChat#1317 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Only the last emoji shortname in a message is converted to unicodeEvtl. vergeben @yash113gadia hat das vor 167 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
RocketChat/EmbeddedChat#1315 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in RocketChat/EmbeddedChat
Ähnliche Issues
-
Out of order / duplicate key error shows the key bytes as decimal or UTF-8, not hexEvtl. vergeben @bardrop hat das heute übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 86/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 80/100
Maintainer antworten meist innerhalb von 3 Tagen
-
`remix-hook-form/middleware` imports `unstable_createContext`, breaking on `react-router` >= 7.9.0Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
code-forge-io/remix-hook-form#189 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100