Home › Forums › Calendar Products › Community Events › Need to add "Uhr" to the event times
- This topic has 7 replies, 3 voices, and was last updated 10 years, 9 months ago by
Leah.
-
AuthorPosts
-
April 27, 2015 at 5:25 am #958432
Torsten
ParticipantHey there,
How can I add the term “Uhr” to the event times?
Currently it reads date, time so: “17. September 2015, 13:00 – 16:30” so here “Uhr” is missing.
In the settings I do not see a field to change this.Thank you very much,
TorstenApril 27, 2015 at 12:59 pm #958697Brook
ParticipantHowdy Torsten,
I would love to help. Would you mind clarifying where and when you would like to add Uhr? Pardon my lack of knowledge about German… Here are some various ways I was picture it might happen:
- 17. September 2015, 13 Uhr– 16:30
- 17. September 2015, 13 Uhr– 16:30 Uhr
- 17. September 2015, 13:00 – 16:30 Uhr
- 17. September 2015, 13:00 Uhr – 16:30 Uhr
Is any of the above possibilites what you had in mind? If not, would you mind sharing what the final one should look like?
Cheers!
– Brook
April 27, 2015 at 1:04 pm #958703Torsten
ParticipantHey Brook,
this one would be perfect:
17. September 2015, 13:00 – 16:30 Uhr
Cheers,
TorstenApril 28, 2015 at 7:26 am #958906Brook
ParticipantGood to know, thanks Torsten.
That is harder to do than you might imagine. Our plugin has 4 date format it uses plus another 6 date time ones. If you want to selectively include Uhr in some instances with the Time, but not all, it is going to be a pain. You would have to write and extensively test a set of filters. This is only a starting place for a couple of the date formats on the site, but if you want you will have to write a bunch of these:
function tribe_change_time_format ($format) { return $format.' \U\h\r'; } //add_filter( 'tribe_date_format', 'tribe_escape_date_format' ); add_filter( 'tribe_datetime_format', 'tribe_change_time_format'); add_filter( 'tribe_time_format', 'tribe_change_time_format');If on the other hand you would like to make it so that anywhere the site displays a time it end with Uhr, that is relatively easy. WordPress gives you the tools in WP Admin > Settings > General. If you select custom format for the time, type “\U\h\r” in at the end:

Does that all make sense? Does the easy option via settings suit your goals?
Cheers!
– Brook
May 4, 2015 at 1:43 pm #960325Torsten
ParticipantHey Brook,
It does indeed!
Thanks a lot for you help,
TorstenMay 5, 2015 at 9:55 am #960590Brook
ParticipantYou are very welcome Torsten. I hope the easier solution (changing the settings in WP Admin > Settings > General) will work. It will cause dates to look like this in some places:
17. September 2015, 13:00 Uhr – 16:30 UhrBut in most places you only display a single time, not a time range. Thus you will usually just see this:
17. September 2015, 13:00 UhrThanks for marking the topic resolved. I will archive it now. Cheers!
– Brook
May 28, 2015 at 12:00 pm #965777Leah
MemberHi there,
Thanks again for your post. We wanted to get in touch and let you know that although we weren’t able to address this issue in our upcoming 3.10 release, it is still very much a priority. We have a ticket in our system and will be investigating a solution to be released in a future version. Thank you for your patience and support while we work on this!
Cheers,
The Events Calendar TeamJuly 20, 2015 at 12:29 pm #988044Leah
MemberHello,
Thank you again for bringing this issue to our attention. We’re happy to say that we have added a fix for this into our upcoming version 3.11 release. Keep an eye on your Updates page for the new version. If you have any trouble with the update (or are still seeing this problem after you update) please start a new thread and we’d be happy to help out.
Thank you for your patience while we got this release ready to go!
Best,
Leah
and the rest of The Events Calendar team -
AuthorPosts
- The topic ‘Need to add "Uhr" to the event times’ is closed to new replies.
