Plugin widget dates are unaffected by WP date format

Home Forums Calendar Products Events Calendar PRO Plugin widget dates are unaffected by WP date format

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #167965
    littleshiva
    Participant

    This is all Greek to me, but I’m copying and pasting what Jesse Petersen told me to put here: “Plugin widget dates are unaffected by WP date format AND customizing the date format in the plugin file” Also, the date-picker/field for the events is in US format and can’t be altered, even when WP is in EU format.

    He sent me an e-mail that said “If I could, I’d change the widget portion, but it appears to run off something different than the system date format. This is another ticket item and I’d send them a shot or link to the sidebar.

    When I changed the date manually in the entry fields for the 23 May event, it kicked it out thinking it was the 23rd month and now the next event is 26 Jun (or rather Jun 26). There is no indication in any of the files that I’ve located that anything uses something other than the system date or the date I set manually in the config file.”

    if(!class_exists(‘TribeDateUtils’)) {
    class TribeDateUtils {
    // default formats, they are overridden by WP options or by arguments to date methods
    const DATEONLYFORMAT = ‘j F, Y’;
    const TIMEFORMAT = ‘g:i A’;
    const HOURFORMAT = ‘g’;
    const MINUTEFORMAT = ‘i’;
    const MERIDIANFORMAT = ‘A’;
    const DBDATEFORMAT = ‘Y-m-d’;
    const DBDATETIMEFORMAT = ‘Y-m-d H:i:s’;
    const DBTIMEFORMAT = ‘H:i:s’;
    const DBYEARMONTHTIMEFORMAT = ‘Y-m’;

    Permalink to original ticket: https://theeventscalendar.com/support/forums/topic/date-needs-to-be-in-french-format/#post-166596

    #169016
    Barry
    Member

    Hi!

    In some cases the plugin outputs dates and times that do not follow the formats specified in WordPress settings – it doesn’t always make sense for them to do so  – but it is definitely possible to adjust this.

    The first thing to note though is that our very next maintenance release will make configuration of date and time formats a lot easier so you may want to wait until that arrives before looking into this (and that release is literally in the final stages of preparation).

    If you need a solution right now though you can add a snippet like this one to force it to use the WP date format – but do note this technique may not be relevant/may no longer work once the next release arrives.

    I hope that helps!

    #177313
    littleshiva
    Participant

    Ok, I passed this info on to Jesse, and his reply was that your snippet had no effect. Here are the deets:
    // default formats, they are overridden by WP options or by arguments to date methods
    const DATEONLYFORMAT = ‘j F, Y’;

    The filter says: $settings[‘same_year_format’] = get_option( ‘date_format’ );

    Please go look at the right sidebar at http://www.lcr-lagauche.org to see what I mean.

    #177533
    Barry
    Member

    OK, but can you clarify what I’m looking at here and what you are expecting to see?

    If I look at http://www.lcr-lagauche.org I can see a blog post with the date 20 mai 2014 so I’m taking it that your WordPress date format is set to ‘j F Y’. When I look at the events list widget on the same page I see dates like 26 juin 2014 and 3 août 2014 which would appear to me to be the same format.

    That suggest to me the snippet is working (or else you found another way to accomplish this) – can you confirm?

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Plugin widget dates are unaffected by WP date format’ is closed to new replies.