Use NumberFormatter instead of legacy NumberFormat
オープン
@devnexen がすでに取り組んでいます。
2024年12月6日 から。
Extension: intl
Feature
Status: Needs Triage
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.2k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 96
説明
Description
The following code:
<?PHP
function nth(int $number) : ?string {
$formatter = new \NumberFormatter('en_US', \NumberFormatter::ORDINAL);
$formatted = $formatter->format($number);
return $formatted === false ? null : $formatted;
}
echo nth(651959195189);
?>
Resulted in this output:
651,959,195,189rd
But I expected this output instead:
651,959,195,189th
PHP Version
PHP 8.3.6
Operating System
Linux Mint 22
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
評価
この issue はまだ評価されていません。