Need to add "Uhr" to the event times

Home Forums Calendar Products Community Events Need to add "Uhr" to the event times

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #958432
    Torsten
    Participant

    Hey 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,
    Torsten

    #958697
    Brook
    Participant

    Howdy 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:

    1. 17. September 2015, 13 Uhr– 16:30
    2. 17. September 2015, 13 Uhr– 16:30 Uhr
    3. 17. September 2015, 13:00 – 16:30 Uhr
    4. 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

    #958703
    Torsten
    Participant

    Hey Brook,

    this one would be perfect:

    17. September 2015, 13:00 – 16:30 Uhr

    Cheers,
    Torsten

    #958906
    Brook
    Participant

    Good 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

    #960325
    Torsten
    Participant

    Hey Brook,

    It does indeed!

    Thanks a lot for you help,
    Torsten

    #960590
    Brook
    Participant

    You 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 Uhr

    But 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 Uhr

    Thanks for marking the topic resolved. I will archive it now. Cheers!

    – Brook

    #965777
    Leah
    Member

    Hi 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 Team

    #988044
    Leah
    Member

    Hello,

    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

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Need to add "Uhr" to the event times’ is closed to new replies.