I am working on a php code below which displays the month in php.
<script>
document.getElementById('title_fr').value = "<?php setlocale(LC_TIME, "frc"); echo strftime("%d %B %Y", strtotime( $this_date )); ?>";
</script>
The above php code returns month name in french as showm below.
janvier
février
mars
avril
mai
juin
juillet
août
septembre
octobre
novembre
décembre
Problem Statement:
I am wondering what changes I need to make in the php code above so that For days of the month, if d = “1” then substitute “1er”
I think I need to make some changes here echo strftime("%d %B %Y", strtotime( $this_date ));
but I am not sure where exactly.
I added er after %d but it has added er after every day of the month.