php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #2011 The strftime() function example is wrong.
Submitted: 1999-08-09 16:57 UTC Modified: 1999-08-09 17:15 UTC
From: fabian dot rodriguez at exocom dot qc dot ca Assigned:
Status: Closed Package: Documentation problem
PHP Version: 3.0.12 OS: RedHat 5.2
Private report: No CVE-ID: None
 [1999-08-09 16:57 UTC] fabian dot rodriguez at exocom dot qc dot ca
at http://www.php3.net/manual/function.strftime.php3
the online documentation gives the following example:

setlocale ("LC_TIME", "C");
print(strftime("%A in Finnish is "));
setlocale ("LC_TIME", "fi");
print(strftime("%A, in French "));
setlocale ("LC_TIME", "fr");
print(strftime("%A and in German "));
setlocale ("LC_TIME", "de");
print(strftime("%A.\n"));

The example should read:

setlocale ("LC_TIME", "C");
print(strftime("%A in Finnish is "));
setlocale ("LC_TIME", "fi");
print(strftime("%A, in French "));
setlocale ("LC_TIME", "fr_CA");
print(strftime("%A and in German "));
setlocale ("LC_TIME", "de");
print(strftime("%A.\n"));

The setlocale() fucntion should provide a link to the complete list of locales or a way to find it.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-08-09 17:15 UTC] eschmid at cvs dot php dot net
I  can't see an error in the documentation. The mentioned links works as suspected.
If I have overlooked something, please report.

-Egon
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 07:01:35 2025 UTC