I am working on a html/php code as shown below:

<?php if(ICL_LANGUAGE_CODE=='fr'){  ?>  /* When the page is in French */
   <time datetime="<?php echo esc_attr(date_format($ts, 'H:i d-m-Y')) ?>"
           data-timezone="<?php echo esc_attr($tz_param) ?>"><?php echo ucfirst(date_i18n( 'j F H:i', $ts->getTimeStamp()-(60*60*4))); ?>
<?php }  ?>

The above html/php code displays the following date/time on the webpage:

1 mars 2019 03:45 

Problem Statement:

I am wondering what changes I should make in the html/php code above when days of the month is "1" then substitute "1er". eg:

1er mars 2019
  • 2
    Is "er" the equivalent of "nth" and "nd" in English? The symbol for that in a date format is S. If F is being translated then S should too: jS F H:i. – Jacob Peattie Jul 24 '19 at 7:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.