derick Tue Jan 15 05:38:36 2002 EDT Modified files: /phpdoc/en/functions datetime.xml strings.xml Log: - Add example to setlocale, fix examples using setlocale Index: phpdoc/en/functions/datetime.xml diff -u phpdoc/en/functions/datetime.xml:1.64 phpdoc/en/functions/datetime.xml:1.65 --- phpdoc/en/functions/datetime.xml:1.64 Wed Jan 9 19:51:21 2002 +++ phpdoc/en/functions/datetime.xml Tue Jan 15 05:38:33 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.64 $ --> +<!-- $Revision: 1.65 $ --> <reference id="ref.datetime"> <title>Date and Time functions</title> <titleabbrev>Date/time</titleabbrev> @@ -1074,13 +1074,13 @@ <title><function>strftime</function> example</title> <programlisting role="php"> <![CDATA[ -setlocale ("LC_TIME", "C"); +setlocale (LC_TIME, "C"); print (strftime ("%A in Finnish is ")); -setlocale ("LC_TIME", "fi_FI"); +setlocale (LC_TIME, "fi_FI"); print (strftime ("%A, in French ")); -setlocale ("LC_TIME", "fr_FR"); +setlocale (LC_TIME, "fr_FR"); print (strftime ("%A and in German ")); -setlocale ("LC_TIME", "de_DE"); +setlocale (LC_TIME, "de_DE"); print (strftime ("%A.\n")); ]]> </programlisting> Index: phpdoc/en/functions/strings.xml diff -u phpdoc/en/functions/strings.xml:1.154 phpdoc/en/functions/strings.xml:1.155 --- phpdoc/en/functions/strings.xml:1.154 Sun Jan 13 16:23:51 2002 +++ phpdoc/en/functions/strings.xml Tue Jan 15 05:38:35 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.154 $ --> +<!-- $Revision: 1.155 $ --> <reference id="ref.strings"> <title>String functions</title> <titleabbrev>Strings</titleabbrev> @@ -2140,6 +2140,22 @@ functionality is not implemented in the platform, the specified locale does not exist or the category name is invalid. An invalid category name also causes a warning message. + </para> + <para> + <example> + <title>setlocale Examples</title> + <programlisting role="php"> +<![CDATA[ +<?php + /* Set locale to Dutch */ + setlocale (LC_ALL, 'nl_NL'); + + /* Output: vrijdag 22 december 1978 */ + echo strftime ("%A %e %B %Y", mktime (0, 0, 0, 12, 22, 1978)); +?> +]]> + </programlisting> + </example> </para> </refsect1> </refentry>