• Hello ??

    I would like to display the months in three digits.

    I.e. MAY – APR – SEP instead of having the whole month name displayed (in order to display it into a small graphic calendar).

    Is there a way to do it ? Has it already been done ? Does a reference exist for it ?

    Thank you very much in advance ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • https://php.net/date

    Is that any good? M is the code to make three-letter month codes. So you’d do something like

    the_date('M');

    It’s case-sensitive though.

    WordPress has a calendar built in, you know. The template tag is <?php get_calendar(); ?>.

    Go to the options menu, and then down to “Default date format”, and change the value to ‘M j, Y’. Minus the quotes of course.

    Thread Starter Co

    (@co)

    Thank you very much ?? The ‘M’ works perfectly !
    Have a wonderful week-wend.

    I’m glad it works for you ?? If you wanted to make it all caps, you can use CSS, the rule is

    .whatever-selector-youre-using {
    text-transform: uppercase; }

    Thread Starter Co

    (@co)

    Hello, it’s me again ??

    I’ve just tried out the M trick with the french version of WordPress, but it doesn’t seem to work as my June month (juin) appears entirely (4 digits).

    Any idea of what I may be doing wrong ?

    Thanks !

    Thread Starter Co

    (@co)

    Well I did find the solution by myself. In fact WordPress is very intelligent ?? (more than myself, lol)

    The months june and july (respectively Juin et Juillet) do have the same first 3 digits. They need the 4th digit in order to establish a differenciation.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘3 digits months’ is closed to new replies.