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

  1. Alin Ionut
    Posted 3 years ago #

    How can i modify date display?

    for example mine is like that: Mi mai 15

    i what to display this: d M Y


  2. naloo
    Posted 3 years ago #

    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
    Posted 3 years 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? :)


    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
    Posted 2 years 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

  • Simple Events Calendar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.