Tagged: , , ,

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #42255
    Anonymous
    Inactive

    In French Quebec, we need to remove the 00 in minutes (11 h 00, 9 h 00, 20 h 00, etc.). Do you know how to do that?

    #45455
    Franky
    Keymaster

    I’m not quite sure I understand. So if the minutes are “00”, you don’t want to show them but in other cases you do?

    Can I ask what time formatting string you’re using?

    #45456
    Anonymous
    Inactive

    I’m using #H h #i. You are right. In french, if the minutes are “00”, you don’t have to show them but in other cases you do (ex. : 13 h for 13:00, 22 h fo 22:00, 23 h 5 for 23:05, 9 h 15 for 09:15, etc.)

    Thank you very much for your great work! I really appreciate it!

    #45457
    Franky
    Keymaster

    Ok, I’ll add an option to remove leading zero’s from minutes (using the php function ltrim will do the job nicely). For the hour: use #G

    #45458
    Anonymous
    Inactive

    Thank you very much!

    #45459
    Anonymous
    Inactive

    When I use #G, it is not working… The results are many numbers in line (1291231800 h 30 for 19:30)

    Also, if i want to see some conditional text in the time like this #@_{\t\o j F Y}, I must always put two slashes (\) to have one when I save the data. It seems like a bug.

    #45460
    Franky
    Keymaster

    Hmmm … I’ll check on the #G, might be an incompatibility between mysql2date() from wordpress and date() from php.

    For the backslashes: it’s a wordpress editor thing, nothing to do with EME on itself. If you use the visual editor that *might* work better (haven’t tested it though)

    #45461
    Franky
    Keymaster

    As I suspected: mysql2date from wordpress uses “G” for something else. I replaced all calls to mysql2date to “date_i18n” and “strtotime”, now it works as expected.

    #45462
    Franky
    Keymaster

    Implemented in trunk:

    added an option to remove leading zeros from minutes: 09 becomes 9, 00 becomes empty

    #45463
    Anonymous
    Inactive

    How can i use the option? Where I find the information?

    #45464
    Franky
    Keymaster

    update the module and check the Settings page for EME.

    #45465
    Anonymous
    Inactive

    Maybe it’s because i use the French version but I don’t see any information about this new option.

    #45466
    Franky
    Keymaster

    Look for “Remove leading zeros from minutes”

    #45467
    Anonymous
    Inactive

    Super! I thought that it was a tag. Thanks.

Viewing 14 posts - 1 through 14 (of 14 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top