Home › Forums › Front-end Issues › ACF Date Picker (date output) › Reply To: ACF Date Picker (date output)
Aha, sure, just use the WordPress function for formatting dates in different languages.
$dateformatstring = "l d F, Y";
$unixtimestamp = strtotime(get_field('date_picker'));
echo date_i18n($dateformatstring, $unixtimestamp);
This is dependent on your blog language setting. More info here: http://codex.wordpress.org/Function_Reference/date_i18n
If you can’t set blog language to french, you can also do it with PHP only.
setlocale(LC_ALL, 'fr_FR');
echo strftime("%A %e %B %Y");
Another example with day of week and month (french):
setlocale(LC_ALL, 'fr_FR');
echo strftime("%A le %d %B, %Y");
//with day of the week = mercredi le 18 septembre, 2013
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.