How to change date formatting

Home Forums Calendar Products Events Calendar PRO How to change date formatting

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #111091
    pknvelp
    Participant

    Barry pointed me to the themer’s guide (https://theeventscalendar.com/support/forums/topic/monthly-agenda-view-acting-weird/) to change how dates are displayed. I can not find the class that formats the date displayed with an event. For example, month names are now before day numbers while in my language, the day’s number goed before the month name.

    Also, in the widget, times are displayed as ‘maart 5 @ 20:00 – 21:30’. To older readers, the @ sign is just strange so I would like to use language instead.

    #111722
    Brook
    Participant

    Howdy pknvelp,

    This snippet here will make things even easier. For this particular date format change you will not need to even fiddle with theme overrides! Just drop this into your theme’s functions.php, underneath the first line “<?php”. If your theme does not have a functions.php file, go to your theme folder, create a new text document file called “functions.php”, and paste this text in the first line of the file “<?php”. On line 2 or 3, paste that snippet.

    On line 4 of that snippet, you can replace the ‘ at ‘ with ant other string of text you want.

    Does that make sense? Did that work for you? Please let me know. Cheers!

    – Brook

    #112221
    Charlotte
    Participant

    Hello,
    I was wondering about the same thing and followed your instructions. It worked fine on the events page, but in the mini-callendar that I have displayed in the widget. It sill shows up with the @ symbol. Would it be possible to make the changes here as well.

    Kind regards
    Charlotte

    #112406
    Brook
    Participant

    Howdy Charlotte,

    I would like to help if I can. It’s strange though, that code is changing the sidebar widget for me. Perhaps there is some sort of caching going on that is causing this change to not yet show up for you. Do you a caching plugin enabled perchance? Have you tried clearing your browser’s cache? Please let me know. Thanks!

    – Brook

    #113329
    Charlotte
    Participant

    This reply is private.

    #114000
    Brook
    Participant

    You are welcome Charlotte. That is a bit strange. I tested creating an event for next month, and it still uses my replacement text instead of the @ symbol. I truly have no idea why your site is behaving differently.

    You could try searching through the plugin source code for ” @ ” (make sure to include the space on either side of the symbol) and replacing the relevant ones with your altered text. If it continues to use the wrong symbol after that, then we have encountered some strange voodoo indeed. I recommend an exorcism. 😉 This is not an ideal solution, it is more of a test just to see if the problem can be resolved.

    Is the snippet working properly for you, pknvelp?

    – Brook

    #115809
    Charlotte
    Participant

    Hello again,
    Thought I open up the site I’m working since it might be cursed 😉 http://www.xactfashion.se (please have a look) The problem occur when I use the arrows at the top of the mini-calendar to flick forward to the next coming month. As you can see on the icon below the replacement for @ is kl. and is working fine in the beginning, but if you use the arrow and click forward to April the @ symbol is back. Also if I now go back to March the symbol is there as well. The upcoming eventlist works fine so it,s really just in the top field as I flick forward to the next month that is not correct.

    It doesn’t really matter and Im quite happy the way it is, but I’m the kind of person who find it very hard to let go of a problem. Where do I find the plugin source code?

    Kind regards
    Charlotte

    #116194
    Brook
    Participant

    Thanks for sharing the link. That does remove any ambiguity. Oddly, when I do the exact same steps on my local install it works fine. The major difference between my install and yours is that I am running WP 3.8.1, TEC 3.4.1, and TEC PRO 3.4 Perhaps updating your install, when you are ready to do so, will fix it? If not, the only other thing I can think to try is that search and replace.

    The source code is found within your /wp-content/plugins/ folders. You will see events-calendar-pro/ and the-events-calendar/ in there.

    – Brook

    #200938
    sandras
    Participant

    This reply is private.

    #200943
    sandras
    Participant

    This reply is private.

    #212066
    Brook
    Participant

    Since this topic is now resolved it is being closed down. I am glad everyone was able to get that snippet working. Cheers!

    – Brook

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘How to change date formatting’ is closed to new replies.