[wp-trac] [WordPress Trac] #49551: When editing a post date with some locales, the date format of month would shows wrong one.
WordPress Trac
noreply at wordpress.org
Sat Feb 29 03:37:37 UTC 2020
#49551: When editing a post date with some locales, the date format of month would
shows wrong one.
--------------------------+-----------------------------
Reporter: tai | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: trunk
Severity: normal | Keywords:
Focuses: javascript |
--------------------------+-----------------------------
When editing a post date with some locales, the date format of month would
shows wrong one.
It happens only when using the classic editor functions in the core, and
the Gutenberg editor shows the right date format.
Step to reproduce:
1. Install the classic editor and activate it.
2. Select "日本語" (Japanese) at "Site Language" option.
3. Open an edit screen of any post.
4. Now the Published date (in ja "投稿日") string looks like "2020年2月12
日"(bug-1.png)
4. Click "編集"(Edit) at "投稿日" in Publish block.
5. Select any month of NOT current one and click the OK button.
7. Now the Published date string looks like "2020年1月月12日"(bug-2.png),
inserted the unnecessary month suffix of Japanese "月".
How to fix:
I've dug into the source and found it happens around the below but no idea
how to fix so far:
https://github.com/WordPress/WordPress/blob/master/wp-
admin/js/post.js#L762-L772
Version:
I've checked it on WordPress 5.4-beta3 and WordPress 5.3.2
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49551>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list