Conversation
wp_date() / get_the_date() が D / M / l / F format を site locale に
翻訳するため、{{feed.last_build_date:r}} の出力が ja で
"月, 27 4月 2026 ..." になっていた。RFC 2822 / RFC 3339 は曜日/月名が
英語固定なので、PHP の date() 同等の挙動が必要。
DateTimeImmutable::format() でサイトタイムゾーンに変換しつつ常に英語名
を出す Feedwright\Bindings\DateFormatter を追加し、FeedProvider /
NowProvider / PostProvider / PostRawProvider の wp_date 呼び出しを
全てこちらに差し替えた。
実機確認 (locale=ja):
- {{now:r}} → Mon, 27 Apr 2026 21:08:20 +0900 ✓
- {{feed.last_build_date:r}} → Mon, 27 Apr 2026 21:08:20 +0900 ✓
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1
Summary
`wp_date()` / `get_the_date()` が D/M/l/F format をサイト locale に翻訳するため、`{{now:r}}` / `{{feed.last_build_date:r}}` などの RFC 2822 出力が ja 環境で「月, 27 4月 2026 ...」となっていた。
`DateTimeImmutable::format()` を使う `Feedwright\Bindings\DateFormatter` を追加し、4 つの provider (Feed / Now / Post / PostRaw) の `wp_date` を差し替え。
Verification (locale=ja)
Test plan