Events Made Easy › Forums › Bug fixed or feature request implemented › Remove « 00 » in minutes
- This topic has 13 replies, 2 voices, and was last updated 15 years ago by
Anonymous.
-
AuthorPosts
-
Tue 30 Nov 2010 at 15:06 #42255
Anonymous
InactiveIn 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?
Tue 30 Nov 2010 at 18:34 #45455Franky
KeymasterI’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?
Tue 30 Nov 2010 at 22:07 #45456Anonymous
InactiveI’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!
Tue 30 Nov 2010 at 22:53 #45457Franky
KeymasterOk, 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
Wed 1 Dec 2010 at 14:23 #45458Anonymous
InactiveThank you very much!
Wed 1 Dec 2010 at 14:33 #45459Anonymous
InactiveWhen 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.
Wed 1 Dec 2010 at 16:00 #45460Franky
KeymasterHmmm … 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)
Wed 1 Dec 2010 at 20:24 #45461Franky
KeymasterAs 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.
Wed 1 Dec 2010 at 22:14 #45462Franky
KeymasterImplemented in trunk:
added an option to remove leading zeros from minutes: 09 becomes 9, 00 becomes empty
Mon 6 Dec 2010 at 15:58 #45463Anonymous
InactiveHow can i use the option? Where I find the information?
Mon 6 Dec 2010 at 16:02 #45464Franky
Keymasterupdate the module and check the Settings page for EME.
Mon 6 Dec 2010 at 16:29 #45465Anonymous
InactiveMaybe it’s because i use the French version but I don’t see any information about this new option.
Mon 6 Dec 2010 at 19:02 #45466Franky
KeymasterLook for “Remove leading zeros from minutes”
Fri 10 Dec 2010 at 15:53 #45467Anonymous
InactiveSuper! I thought that it was a tag. Thanks.
-
AuthorPosts
- The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.