Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post Date block doesn't display the S format for displaying the english suffix of a month number in the editor #39567

Closed
talldan opened this issue Mar 18, 2022 · 1 comment
Assignees
Labels
[Block] Post Date Affects the Post Date Block [Package] Date /packages/date [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Bug An existing feature does not function as intended

Comments

@talldan
Copy link
Contributor

talldan commented Mar 18, 2022

Description

Observed while testing #39209. If you enter a custom format with a month number like jS as a custom format, the S is ignored.

This is probably an issue with the dateI18n function that the post date block uses.

I tried ensuring my locale is set to English (UK), just in case that was the cause, but the problem seems to persist.

Step-by-step reproduction instructions

  1. Enter a custom format for the Post Date block that includes jS for the month number.
  2. Observe that the month number suffix (e.g. the 'st' in 1st) is not shown in the editor

Screenshots, screen recording, code snippet

Screen Shot 2022-03-18 at 3 09 02 pm

Environment info

  • Gutenberg trunk.
  • Brave on Mac OS

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@talldan talldan added [Type] Bug An existing feature does not function as intended [Package] Date /packages/date [Block] Post Date Affects the Post Date Block labels Mar 18, 2022
@talldan talldan changed the title Post Date block doesn't support the S format for displaying the english suffix of a month number Post Date block doesn't display the S format for displaying the english suffix of a month number in the editor Mar 18, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Mar 18, 2022
@talldan
Copy link
Contributor Author

talldan commented Mar 21, 2022

Duplicate of #15221

@talldan talldan marked this as a duplicate of #15221 Mar 21, 2022
@talldan talldan closed this as completed Mar 21, 2022
@talldan talldan added the [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed label Mar 21, 2022
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Date Affects the Post Date Block [Package] Date /packages/date [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants