note 68965 added to function.strftime

From: Date: Thu, 17 Aug 2006 15:45:49 +0000
Subject: note 68965 added to function.strftime
Groups: php.notes 
Request: Send a blank email to php-notes+get-116010@lists.php.net to get a copy of this message
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. ---- Server IP: 66.163.161.117 Probable Submitter: 85.214.9.193 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.strftime.php Edit -- https://master.php.net/note/edit/68965 Del: integrated -- https://master.php.net/note/delete/68965/integrated Del: useless -- https://master.php.net/note/delete/68965/useless Del: bad code -- https://master.php.net/note/delete/68965/bad+code Del: spam -- https://master.php.net/note/delete/68965/spam Del: non-english -- https://master.php.net/note/delete/68965/non-english Del: in docs -- https://master.php.net/note/delete/68965/in+docs Del: other reasons-- https://master.php.net/note/delete/68965 Reject -- https://master.php.net/note/reject/68965 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#116010) next »