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

Allow the date- and time-format strings to contain escaped characters #637

Merged
merged 5 commits into from
May 3, 2024

Conversation

carstingaxion
Copy link
Collaborator

The current conversion from php dateformat into javascript moment format is not able to handle escaped characters.

Description of the Change

My requested change makes the format conversion aware of escaped characters and tells it, to just go on, in such case.

Closes #632

How to test the Change

  1. Go to Events > Settings and set the date format as "j \d\e F \d\e Y"
  2. Create an event
  3. Make sure the shown date in the editor looks like "DAY de MONTH de YEAR"

Changelog Entry

Fixed - Bug fix Event date display in the editor when using escaped characters in date or time format

Credits

Props @carstingaxion

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@carstingaxion
Copy link
Collaborator Author

It's a little bit annoying to wait for php unit tests to finish, when the only changed files were JS files.
We should consider some separation at this point.

For the environment 🌴 🌳 🌲 !

src/helpers/datetime.js Show resolved Hide resolved
@carstingaxion
Copy link
Collaborator Author

Ok, all tests passed, but the one DB issue comes up again

@carstingaxion
Copy link
Collaborator Author

Ok, all tests passed, but WordPress/plugin-check-action#61 comes up again

... which is a little weird because this branch hasn't even the workflow-file available.

@carstingaxion carstingaxion requested a review from mauteri May 3, 2024 18:00
@mauteri mauteri merged commit a2aa5fa into GatherPress:main May 3, 2024
11 checks passed
@carstingaxion carstingaxion deleted the fix/632 branch May 7, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow backslashes in date format
2 participants