note 27349 deleted from function.strftime by derick
| From: | derick@php.net | Date: | Sun, 14 Aug 2005 12:03:13 +0000 |
| Subject: | note 27349 deleted from function.strftime by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-93623@lists.php.net to get a copy of this message | ||
Note Submitter: newbie at hotmail dot com
----
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");