Relative timestamps (<t:…:R>) show wrong direction and size past ~4 weeks ("in 0 months" for a date 2 years ago)
Los mantenedores suelen responder en 1 día
@MuhammadFaizan-prog ya está trabajando en esto.
Desde el 14/11/2026.
- #1426 de @MuhammadFaizan-prog — abierto
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript
- Área
- frontend
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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".
- Lenguaje dominante
- JavaScript
- Estrellas
- 170
- Forks
- 397
- Merge medio
- 12 d 14 h
- PR fusionados (30 d)
- 6
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de RocketChat/EmbeddedChat
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
RocketChat/EmbeddedChat#1429 ·
Los mantenedores suelen responder en 1 día
-
docs: README says Node 22 is required, but .nvmrc pins v24 and preinstall enforces itPosiblemente ocupada @Veerpratapgupta la tomó hace 29 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
RocketChat/EmbeddedChat#1377 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
test: isMessageSequential in layout_editor has no coverageQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
RocketChat/EmbeddedChat#1373 ·
Los mantenedores suelen responder en 1 día
-
Permissions change-detection in useFetchChatData is dead — applyPermissions re-runs on every callPosiblemente ocupada @yash113gadia la tomó hace 166 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
RocketChat/EmbeddedChat#1317 ·
Los mantenedores suelen responder en 1 día
-
Only the last emoji shortname in a message is converted to unicodePosiblemente ocupada @yash113gadia la tomó hace 166 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
RocketChat/EmbeddedChat#1315 ·
Los mantenedores suelen responder en 1 día
Todos los issues de RocketChat/EmbeddedChat
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
webtorrent/webtorrent#3131 ·
-
good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
trustjonathan/STUDY-HUB#15 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100