What is the correct way to write this code so that the output date is properly formatted for French?
<?php $questiondate = date('F d, Y', strtotime('-1 week')); ?>
This code works correctly for English, but I have searched on here for how to do this in French, and none of the threads I found work when I put them in my code.
I have tried the following:
<?php setlocale (LC_TIME, 'fr_FR.utf8','fra'); ?>
<?php $questiondate = strftime('%d %B %Y', strtotime('-1 week')); ?>
But the month is being written in English instead of French.
Thanks in advance.
I have looked at the other threads, but those answers didn't work for what I am trying to do here, which is output a date that is 1 week in the past in French.