WordPress.org

Support

Support » Plugins and Hacks » Simple Events Calendar » [Resolved] modify date display

[Resolved] modify date display

Viewing 3 replies - 1 through 3 (of 3 total)
  • hi
    in simple-events-calender.php change lines 34-39 like this:

    // The date
    if (strtoupper(substr(PHP_OS, 0, 3)) == ‘WIN’) {
    define(‘DATE’, __(‘%a %#d. %B’,SE_TEXTDOMAIN)); // For WINDOWS %e doesn’t work
    } else {
    define(‘DATE’, __(‘%a %e. %B’,SE_TEXTDOMAIN));
    }

    will give you an date display that looks like this:
    Mo 20. Mai 2013 20:30

    It is a solution, but not the best practise hacking the plugin files. I wonder if creating your own translation file would be a better approach since the date format is specified within the __() function?

    I’m currently looking to change the date format myself to “2nd June 6.00” but I’ve no idea what date system is actually used in this plugin. Using the format characters from http://php.net/manual/en/function.date.php makes a big mess of the dates in the plugin. Any hints, please? 🙂

    Cheers!

    EDIT: looking through the plugin php file I found that if refers to the strftime() function ( http://www.php.net/manual/en/function.strftime.php ), so the funny codes with percentage sign are now clear 🙂

    I changed mine to only display month and day (%B %d) but on my site, I can’t get it to display the month correctly. It just displays “%B”

    Any idea how to fix this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] modify date display’ is closed to new replies.
Skip to toolbar