I have a php_view field in a view, it basically pulls a date field on a specific node, and then use the php function setISODate to get the 'monday' date of the week.
The thing is, i'm on a french language site and the date that the function return is in english, not that I don't like english hehe but the month just doesn't fit very well in the display on that view
Here's the code:.
<?php
// Retrieve the date field of that node.
$node = node_load($data->nid);
$date_field = $node->field_date;
$date = $date_field['und'][0]['value'];
// Put the year in $annee and the week number in $semaine.
$annee = date("Y", strtotime($date));
$semaine= date("W", strtotime($date));
// Get the monday date of that week
$lundi = new DateTime();
$lundi->setISODate($annee , $semaine);
print "Semaine du " . $lundi->format('j F Y');;
?>
I've tried to use that bit ofthe following code:, but it doesn't do anything.
setlocale (LC_TIME, 'fr_FR.utf8','fra');
print (strftime("%j %F %Y", $lundi));
?>
but doesn't do anything :(
Thank you very much!