I am working on a php/javascript code below which returns month names in French but it doesn't match the french words which we are using.
<script>
document.getElementById('title_fr').value = "<?php setlocale(LC_TIME, "frc"); echo strftime("%d %b %Y", strtotime( $this_date )); ?>";
</script>
The above script returns the month names in french which is not matching our set of month names in french.
mars
avr.
mai
juin
juil.
août
sept.
oct.
nov.
déc.
Following are the set of month names in French which we follow:
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 script above so that it returs month name in french which I am following.
I believe I need to create an array as shown below with the month names in french.
const monthNamesFr = ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"];