WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] American Event Date format instead of European (+24h) (17 posts)

  1. Shonu
    Member
    Posted 3 years ago #

    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/

  2. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    could it be your WPLANG isn't set?

  3. Shonu
    Member
    Posted 3 years ago #

    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

  4. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

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

  5. Shonu
    Member
    Posted 3 years ago #

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

  6. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

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

  7. Shonu
    Member
    Posted 3 years ago #

    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

  8. Shonu
    Member
    Posted 3 years ago #

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

    sorry

  9. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    i need one too so I can sympathize :)

  10. webaware
    Member
    Posted 2 years ago #

    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.

  11. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    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.

  12. webaware
    Member
    Posted 2 years ago #

    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

  13. webaware
    Member
    Posted 2 years ago #

    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

  14. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

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

    will look at including this for 5.0.5

  15. webaware
    Member
    Posted 2 years ago #

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

  16. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

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

  17. webaware
    Member
    Posted 2 years ago #

    G'day Marcus, good stuff. Thanks for all your efforts.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic