Home Forums General Issues Format date/time Reply To: Format date/time

  • Hi,

    This is how you should use date_i18n with ACF:

    $dateformatstring = "l d F, Y";
    $unixtimestamp = strtotime(get_field('date_picker'));
    echo date_i18n($dateformatstring, $unixtimestamp);

    This depends on your blogs language setting. If you want to manually specify the locale in PHP, ignoring WordPress, you can do it like this:

    setlocale(LC_ALL, 'fr_FR');
    echo strftime("%A le %d %B, %Y");
    //with day of the week = mercredi le 18 septembre, 2013