Support » Plugin: Events Manager » [Plugin: Events Manager] American Event Date format instead of European ( 24h)

  • Resolved Shonu

    (@shonu)


    Hi

    just noticed that the Date issue returned.
    My WP is setup for d.m.Y Date format and H:i time (24hours)

    When choosing a date for an event, the date string used to be fixed to display the notation chosen above (e.g. 30.06.11 for today and NOT 06/30/11 American style)

    Is EM not using the WP settings or is this the Calendar popup plugin within the plugin that fell back to un-modded version with your recent updates ?

    Apart from that, I would like to have 24hours time settings and no AM/PM.
    Sidenote: I do get funny effects with Firefox text field auto comepletion when updating the time fields.

    Thanks for looking into this again.

    http://wordpress.org/extend/plugins/events-manager/

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Marcus

    (@netweblogic)

    could it be your WPLANG isn’t set?

    Shonu

    (@shonu)

    My default is:
    define (‘WPLANG’, ”);
    ==>US, indeed

    Setting
    define (‘WPLANG’, ‘en-GB’);
    define (‘WPLANG’, ‘en_IE’);

    all comes to the same reverse month/day notation
    Only
    define (‘WPLANG’, ‘de-DE’);
    does the job, but British do NOT use first month, then day.
    I would expect, that the format for dates specified under General Settings would be used at all times, independent from that setting….., or not ?

    Is this now a WP issue, or EM or another external party ?

    Thanks

    Plugin Author Marcus

    (@netweblogic)

    you probably want en_GB, it works in UK sites for sure

    Shonu

    (@shonu)

    With my list I intended to that I tried both.
    define (‘WPLANG’, ‘en-GB’);
    would not get me at least d/m/Y.

    Plugin Author Marcus

    (@netweblogic)

    en_GB definitely works (tested various times independently). if it doesn’t then maybe some other plugin or your theme is messing it up.

    Shonu

    (@shonu)

    Nope, sweept all Plugins (deactivate and only left 4.0.83 on
    Still:
    define (‘WPLANG’, ‘en-GB’);

    does NOT show me 01/07/2011 but 07/01/2011

    Shonu

    (@shonu)

    Arghhh..
    just now saw the hyphen instead of the underscore!
    ..I need vacation….

    sorry

    Plugin Author Marcus

    (@netweblogic)

    i need one too so I can sympathize 🙂

    That’s fine for en_GB, but there are other en locales that wronglish dates don’t work for (like AU, NZ, IE, ZA, CA). The simple fix is to set the correct WPLANG, and then change function em_js_localize_vars() to recognise all but wronglish as en-GB:

    if (preg_match('/^en_(?:GB|IE|AU|NZ|ZA|CA)$/', WPLANG)) {
        $locale_code = 'en-GB';
    }

    OK, so en_CA is somewhere in between, but for dates it uses the same format as en_GB which is the biggie here.

    Plugin Author Marcus

    (@netweblogic)

    do all these other countries use the dd/mm/yyyy formats as well webaware?

    need to revisit dates and localization, because e.g. canada has mixed variations – http://en.wikipedia.org/wiki/Date_and_time_notation_in_Canada

    will probably make this a choice in the near future (will be reworking the way dates/times are chosen to make it easier), rather than guess by localization.

    G’day Marcus,

    Yes, CA is messy (but I think most use dd/mm/yyyy). AU, NZ, ZA and IE all follow the UK and Europe on date format (and spelling 🙂 and you can add en_TT (Trinidad and Tobago) and en_JM (Jamaica) which do likewise.

    I don’t know about en_CB (Carribean — probably mixed) or en_ZW (Zimbabwe — probably dd/mm/yyyy) — I suspect some of them follow GB (as old colonies) but couldn’t tell you.

    Using an option for the date format would indeed be better than guessing by locale. Until then, this quick hack gets the non-US english speaking world there.

    cheers,
    Ross

    G’day Marcus,

    I see that this is still an issue in v5.0.42; is there any reason you can’t integrate this patch into your code until you can do the option thing?

    cheers,
    Ross

    Plugin Author Marcus

    (@netweblogic)

    lots of things to do atm, that’s why.

    will look at including this for 5.0.5

    G’day Marcus, fair enough; I noticed you’d been busy 🙂 (and now I’m busy trying to match the v5+ changes!)

    Plugin Author Marcus

    (@netweblogic)

    it’s in the dev version now, will add more date formatting possibilities in the near future.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Plugin: Events Manager] American Event Date format instead of European ( 24h)’ is closed to new replies.