note 68965 deleted from function.strftime by danbrown

From: Date: Wed, 04 Feb 2009 01:19:50 +0000
Subject: note 68965 deleted from function.strftime by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-150186@lists.php.net to get a copy of this message
Note Submitter: Moritz Stoltenburg ---- In response to the note supplied by "Arpad Borsos": I think the whole truth is that the output of strftime() considers whatever you stated with setlocale(). <?php /* Berlin is in Germany */ $locale = setlocale (LC_ALL, 'de_DE.UTF-8'); /* Output: Donnerstag, 23. März 2006 (and hopefully UTF-8 ;) */ echo strftime ("%A, %d. %B %Y", strtotime('2006-03-23')); /* try different possible locale names for german as of PHP 4.3.0 */ $locale = setlocale(LC_ALL, 'de_DE.UTF-8', 'de_DE.UTF-8@euro', 'de_DE'); echo "Preferred locale for german on this system is '$locale'"; ?> Check the documentation of setlocale() for more. setlocale (LC_ALL, 'de_DE.UTF-8') always worked fine for me.

« previous php.notes (#150186) next »