You’re not using the correct piece of code. If you want to use date_i18n, you have to set the language of your WordPress to English. This is a WP specific function.
To use the setlocale method, use this code inside the loop (the setlocale on top is OK):
// FIRST, SET THE WAY YOU WANT TO FORMAT DATE // DETAILS HERE - https://php.net/strftime $dateformatstring = "%A le %d %B, %Y"; // THEN, CONVERT THE FIELD FROM ACF TO UNIX TIMESTAMP $unixtimestamp = strtotime(get_field('data_picker')); // NOW ECHO THE ENGLISH DATE USING PHP'S strftime echo strftime($dateformatstring, $unixtimestamp);
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!