yamori

有給休暇計算を主目的とした簡易勤怠管理システム

react_ui: 日・曜日のフォーマットが常に en なのを修正 MDN には `Intl` の最初の引数 (`locales`) が `undefined` の場合は > The runtime's default locale is used when undefined is passed > or when none of the specified locale identifiers is supported. <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales> と書いてあるがこのページの記述は嘘で、 > `undefined` (or omitted): The implementation's default locale > will be used. <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument> こちらが正解。仕様では "an arbitrarily-ordered duplicate-free List of language tags, ... It represents all locales for which the implementation provides functionality within a particular context." となっている。 Firefox も Chrome も恐らく safety default として en-US になっており 開発に使っている OS ・ブラウザの設定 (en-US/en-GB) と近いためおか しいことに気付かなかった。 ブラウザ実装側で将来的にソートする可能性もないとは言い切れないが...。 結果に依存できない以上明示的に指定するのが安全。

Changes

2 changed files (+2/-2)