WordPress.org

Ready to get started?Download WordPress

Forums

Simple Events Calendar
[resolved] modify date display (4 posts)

  1. Alin Ionut
    Member
    Posted 1 year ago #

    How can i modify date display?

    for example mine is like that: Mi mai 15

    i what to display this: d M Y

    http://wordpress.org/extend/plugins/simple-events-calendar/

  2. naloo
    Member
    Posted 1 year ago #

    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

  3. rootkowski
    Member
    Posted 1 year ago #

    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 :)

  4. thatwastaxing
    Member
    Posted 12 months ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.