Relative timestamps (<t:…:R>) show wrong direction and size past ~4 weeks ("in 0 months" for a date 2 years ago)
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- frontend
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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".
- 主要言語
- JavaScript
- スター
- 170
- フォーク
- 397
- 平均マージ
- 12日 14時間
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
RocketChat/EmbeddedChat のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
RocketChat/EmbeddedChat#1429 ·
メンテナーはふだん 1 日以内に返信
-
docs: README says Node 22 is required, but .nvmrc pins v24 and preinstall enforces it対応中かも @Veerpratapgupta が 29 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
RocketChat/EmbeddedChat#1377 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
test: isMessageSequential in layout_editor has no coverage再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
RocketChat/EmbeddedChat#1373 ·
メンテナーはふだん 1 日以内に返信
-
Permissions change-detection in useFetchChatData is dead — applyPermissions re-runs on every call対応中かも @yash113gadia が 166 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
RocketChat/EmbeddedChat#1317 ·
メンテナーはふだん 1 日以内に返信
-
Only the last emoji shortname in a message is converted to unicode対応中かも @yash113gadia が 166 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
RocketChat/EmbeddedChat#1315 ·
メンテナーはふだん 1 日以内に返信
RocketChat/EmbeddedChat の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
webtorrent/webtorrent#3131 ·
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
trustjonathan/STUDY-HUB#15 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100