Hey mckenna,
Yes, I’ve had finally found the same solution. It seems that this is the only way to make it works. Thanks for your reply !
My piece of code :
<?php
// get the publishing date
if ( $date = get_field('publishing-date') ) {
$dateTime = DateTime::createFromFormat("Ymd", $date);
if ( is_object($dateTime) ) {
setlocale(LC_TIME, 'fr_FR' );
$date = $dateTime->format('j F Y');
$year = strftime('%Y', strtotime($date));
$month = strftime('%m', strtotime($date));
$day = strftime('%d', strtotime($date));
$date = strftime('%e %B %Y', strtotime($date));
}
} ?>