note 27349 added to function.strftime
| From: | newbie at rack1 dot php dot net | Date: | Tue, 03 Dec 2002 00:28:25 +0000 |
| Subject: | note 27349 added to function.strftime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40281@lists.php.net to get a copy of this message | ||
The provided example is very bad for newbies. Why does setlocale with "C" print out a date
in english? Why is this not even documented on the setlocale page? Why is the example text inserted
into the strftime function? Such hacks are a sure way to confuse a lot of people.
Examples should be as simple as possible. Remember that people are here because they don't know
everything but would like to know.
So if you are a newbie like me, here is the same example, formatted differently, so that you may
understand it more easily:
echo "The current time with your standard settings is: ";
setlocale (LC_TIME, "C");
// C stands for "standard settings"
echo strftime ("%A");
echo " in finnish: ";
setlocale (LC_TIME, "fi_FI");
echo strftime ("%A");
echo " in french: ";
setlocale (LC_TIME, "fr_FR");
echo strftime ("%A");
echo " in german: ";
setlocale (LC_TIME, "de_DE");
echo strftime ("%A");
--
http://www.php.net/manual/en/function.strftime.php
http://master.php.net/manage/user-notes.php?action=edit+27349
http://master.php.net/manage/user-notes.php?action=delete+27349
http://master.php.net/manage/user-notes.php?action=reject+27349