Date formatting wrong

Home Forums Calendar Products Events Calendar PRO Date formatting wrong

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #688424
    crystalparknewmedia
    Participant

    Hi,

    The provided URL is an development version.

    Take a look at this page. Below the title there is the from – to date. The formatting is incorrect.

    It maybe that it is correct in some counties but for Dutch people (The Netherlands) this is not a valid formatting.

    It should be:
    [from-month-number] [from-month] [from-year] [seperator] [to-month-number] [to-month] [to-year]
    so (in dutch): 6 september 2014 – 28 september 2014

    At the moment it echo’s: 6 september 2014 – 28

    Any thought on this / quick fix?

    With Regards,
    Paul

    #689473
    Barry
    Member

    Hi Paul!

    I’m sorry you are experiencing difficulties.

    I do see that you already tried running through our standard troubleshooting steps which is awesome:

    YES, I’ve deactivated all other plugins to check for a plugin conflict.
    YES, I’ve reverted to the 2011 default WordPress theme (with other plugins still deactivated) to check for a theme conflict.

    Just for the avoidance of doubt can I ask you to confirm if this made any difference or allowed you to isolate any conflicts?

    I’m also curious as to whether or not you have adjusted any of the date format settings found in the Events > Settings > Display admin screen – could that be impacting here?

    I look forward to hearing from you 🙂

    #689619
    crystalparknewmedia
    Participant

    Hi Barry,
    Yep, I have deactivated all plugins and the current active theme is twentyfourteen. I recon that should suffice.

    I did found out that this only occurs when the from – to date is within the same month.
    See the dates below the title:
    Example in same month
    Example not in same month

    Here you can see the date format settings:

    I can provide login credentials if you whish?

    Cheers,
    Paul

    #689627
    crystalparknewmedia
    Participant

    Whoops, linked img wrong ;P, again…

    #689632
    crystalparknewmedia
    Participant

    oh my… I broke this page =) No img styling here?

    sry, here is the normal link.

    #689652
    crystalparknewmedia
    Participant

    This reply is private.

    #691606
    Barry
    Member

    Thanks – I don’t think I’ll need those credentials though – your screenshot gave me what I needed 🙂

    This definitely seems like a bit of a shortcoming in our implementation; however, it is actually possible to completely override things using the tribe_events_event_schedule_details hook and so break away from any restrictions our settings effectively enforce. The basic outline for that sort of solution would look something like this:

    add_filter( 'tribe_events_event_schedule_details', 'custom_schedule_details' );
    
    function custom_schedule_details() {
        $start_date = tribe_get_start_date( null, false, 'PHP style date format' );
        $end_date = tribe_get_end_date( null, false, 'PHP style date format' );
        return "$start_date to $end_date";
    }

    This would give you absolute control. Catching situations more selectively such as only overriding things when it is a multiday event taking starting and ending in the same year is going to be doable using the same filter hook – but a little more involved than we would usually cover here in the forums.

    All that to say, I hope that gives you some avenues to explore – namely, writing a custom date formatting function or else temporarily changing your date format settings (even if not ideal, perhaps it could function as a temporary measure until we can reconsider our settings in this regard?).

    Does that help?

    #700800
    crystalparknewmedia
    Participant

    Hi Barry,

    I wil look into this today and report back. Thanks.

    #700807
    crystalparknewmedia
    Participant

    yep! precisely what I needed, thanks!

    #701241
    Barry
    Member

    Excellent 🙂

    In that case I will go ahead and close this thread, but of course if we can help with anything else just open a new thread and one of the team will be only too happy to assist.

    Last but not least, we’re always keen to hear your thoughts on The Events Calendar and if you would like to leave a note on our plugin review page we’d love to hear from you. Thanks again!

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Date formatting wrong’ is closed to new replies.