Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Stricter `datetime` validation

オープン
#266 コメント 5 件 リアクション 1 件 担当者 0 名 GitHub で見る

@ryux1 がすでに取り組んでいます。

2026年9月7日 から。

  • #378 @ryux1 による — オープン

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript
領域
frontend, web-dev

調査の方向性

まず datetime 属性のドキュメントと、issue に記載されている JavaScript Date コンストラクターの動作を確認し、その後、リンクされているクロスブラウザーの例を比較します。検証と regex-option の動作を定義し、一貫性のない日付文字列に対して何が起きるべきかも含めます。完了条件は、期待される動作が文書化され、影響を受けるすべてのブラウザーで検証されていることです。

索引モデルが issue の本文から書いたものです。

説明

enhancement help wanted

The docs about the datetime attribute say:

This must be a valid ISO8601 DateTime

This statement is incorrect. Any value that can be passed to the Date constructor will work which presents a cross-browser issue because JS engines are inconsistent in which formats their Date constructor accept.

For example, the golang default string representation only parses in v8:

$ eshost -e "new Date('2009-11-10 23:00:00+00:00 UTC')"
#### JavaScriptCore
Invalid Date

#### spidermonkey
Invalid Date

#### v8
Wed Nov 11 2009 00:00:00 GMT+0100 (Central European Standard Time)

Also try this fiddle in multiple browsers.

How about adding an option attribute to pass in a validation regex into the element to validate the passed dates, when present? This would at least not make this issue missable by developers who only test in Chrome.

主要言語
JavaScript
スター
4k
フォーク
194
平均マージ
4日 10時間
マージ済み PR(30日)
5

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/relative-time-element のほかの issue

github/relative-time-element の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。