info:myphp:date_set_locale

date_set_locale.php

<?php
   /* Configure le script en français */
      setlocale (LC_ALL, 'fr_fr');

         /* Affiche date */
    echo "Mktime 22.12.1978: " .strftime ("%A %e %B %Y", mktime (0, 0, 0, 12, 22, 1978));
    echo "<hr>Today: " .strftime ("%A, %e %B %Y %r:%M:%S", mktime(date("D, m M Y - h:i:s")));
      setlocale(LC_TIME, "fr");
    echo "<hr>" .strftime("%c, en Français ");
    echo "<hr>" .strftime("%A, %e %B %Y %r = %H:%M:%S, en Français ");


?><hr> 
source: <a href='http://ch.php.net/manual/fr/function.strftime.php'>http://ch.php.net/manual/fr/function.strftime.php</a>
  • info/myphp/date_set_locale.txt
  • Dernière modification : 2018/07/18 09:45
  • de radeff