- Issue created by @tim-diels
- 🇳🇱Netherlands johnv
in the past, I had several requests for reformatting the time.
e.g., in php, ony am/pm is supported, whereas AM/PM or a.m./p.m. was desired.That is why I added a hook, so each could user there own requirements. Please check the office_hours.api.php file.
- 🇧🇪Belgium tim-diels Belgium 🇧🇪
I understand that it would be almost impossible to maintain all request around this.
But instead of hardcoding the 4 formatters that are there now, we could introduce a plugin system for the time formatting.
In that way, someone would be able to provide more time formatters if needed and is more straightforward then working with hooks.
Also I'm fan of making the site building experience more easy and having to code this every time over and over would be not productive.
Would you be open to the plugin system? Then I could start with the once that are already provided and then I can easily maintain the others myself or add them if wanted. - 🇳🇱Netherlands johnv
We can leverage the admin/config/regional/date-time functionality.
I am willing to support that. It will require an update hook, too.But that does not solve the am/pm vs AM/PM vs. A.M./P.M. issue, for instance.
So it would not replace the hook. Or do you think otherwise? - 🇳🇱Netherlands johnv
Renaming the issue,
now it resembles more all other issues from time formatting: Time format issues for Formatter → - 🇳🇱Netherlands johnv
You might want to check ✨ Formatter: Add Event to allow other modules to modify values Fixed . It redirects to the new alter_hook and events.
- Status changed to Closed: works as designed
10 months ago 4:18pm 28 February 2024 - 🇳🇱Netherlands johnv
I guess this can also be done with some small code via ✨ Formatter: Add Event to allow other modules to modify values Fixed .
Feel free to re-open if you have alternative solutions.