Using this code,
setlocale(LC_ALL, 'fr_FR');
$end_date_formatted = utf8_encode(strftime("%d %B %G", mktime(0, 0, 0, $month_end, $day_end, $year_end)));
strftime is not returning the right year only for Dec 31. it should display 31 decembre 2013, but it displays 31 decembre 2014
You
arewere using mktime() wrong. It's:... and you have:
Fixed that, you're probably hitting the issue that the note in the
strftime()
manual page warns about:31st Dec 2013 belongs to first ISO week of next year.
You probably want
%Y
instead.