Support

Account

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