Force format to absolute iso8601
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- frontend
調査の方向性
まず、issue で言及されている相対時間フォーマットのオプションと Intl.DateTimeFormat の動作を確認します。ユーザーが相対テキストの代わりに ISO 8601 形式の絶対タイムスタンプを要求でき、出力が現在の 'Thu, Sep 26' 形式より大幅に長くなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
This code runs on github.com and displays timestamps in relative formatting...
but I really NEVER want to see timestamps in relative form.
I'd so much rather that 'last week' show up as '2024-09-26 19:05:24' or anything similar to iso8601.
Perhaps this just needs a new format string (for non-duration timestamps) of 'iso8601' ?
I can convince github pages to reveal an absolute timestamp with the following snippet pasted into the console.
document.querySelectorAll('relative-time[datetime]')
.forEach( item => {
item.setAttribute('format','datetime')
item.setAttribute('formatStyle','long')
item.setAttribute('precision','minute')
});
... but I get 'Thu, Sep 26' which is way too short.
I can use this snippet to update the title to show what I want but I still have to hover
document.querySelectorAll('relative-time[datetime]')
.forEach( item =>
item.setAttribute(
"title",
new Date(
Math.round(
Date.parse( item.getAttribute("datetime") )
/ 60000 ) * 60000
)
.toISOString()
.replace(/T/," ")
.replace(/[.].*/,"")
+" UTC"
)
)
perhaps I should be looking to convince Intl.DateTimeFormat with a Locale that emits iso8601 instead?
- 主要言語
- JavaScript
- スター
- 4k
- フォーク
- 194
- 平均マージ
- 4日 10時間
- マージ済み PR(30日)
- 5
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/relative-time-element のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
github/relative-time-element#383 · コメント 1 件 ·
-
Inconsistent use of "yesterday"再び着手できるかも @ayushman1210 が 333 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
github/relative-time-element#313 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
github/relative-time-element#307 ·
-
Astro Supportオープン
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
github/relative-time-element#306 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
github/relative-time-element#272 ·
github/relative-time-element の issue をすべて見る
似ている issue
-
fix(套件): test_bundle 往仓库的 preset/skills 写哨兵,并发跑的 test_installer 拷贝时撞 ENOENT(CI 红)対応中かも @Miaotofu01 が今日担当しました。 オープンneeds-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Miaotofu01/Study-Mate#216 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
-
beginner-friendly category:fixtures community enhancement first-timers-only good first issue hacktoberfest help wanted low hanging fruit micro-contribution type: task up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
Berserk-hub150/skillhawk#229 · コメント 1 件 ·
メンテナーはふだん 8 日以内に返信
-
WlanConfUpdateSensor falsely reports wifi interface appearing when sysfs inode cache is reclaimedオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
firewalla/firerouter#2180 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
andromarces/agent-loops#976 ·
メンテナーはふだん 1 日以内に返信