betz Fri Mar 21 10:46:15 2003 EDT
Modified files:
/phpdoc/en/reference/datetime/functions gmdate.xml gmstrftime.xml
microtime.xml mktime.xml
strftime.xml strtotime.xml
Log:
tags in examples
Index: phpdoc/en/reference/datetime/functions/gmdate.xml
diff -u phpdoc/en/reference/datetime/functions/gmdate.xml:1.5
phpdoc/en/reference/datetime/functions/gmdate.xml:1.6
--- phpdoc/en/reference/datetime/functions/gmdate.xml:1.5 Tue Mar 11 19:26:46
2003
+++ phpdoc/en/reference/datetime/functions/gmdate.xml Fri Mar 21 10:46:14 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/datetime.xml, last change in rev 1.2 -->
<refentry id="function.gmdate">
<refnamediv>
@@ -22,8 +22,10 @@
<title><function>gmdate</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
echo date ("M d Y H:i:s", mktime (0,0,0,1,1,1998));
echo gmdate ("M d Y H:i:s", mktime (0,0,0,1,1,1998));
+?>
]]>
</programlisting>
</example>
@@ -45,7 +47,7 @@
</para>
<para>
PHP cannot fix broken system libraries. Contact
- your OS vendor for a fix to this a similar problems.
+ your OS vendor for a fix to this and similar problems.
</para>
</note>
<para>
Index: phpdoc/en/reference/datetime/functions/gmstrftime.xml
diff -u phpdoc/en/reference/datetime/functions/gmstrftime.xml:1.4
phpdoc/en/reference/datetime/functions/gmstrftime.xml:1.5
--- phpdoc/en/reference/datetime/functions/gmstrftime.xml:1.4 Fri Jan 31 12:41:25
2003
+++ phpdoc/en/reference/datetime/functions/gmstrftime.xml Fri Mar 21 10:46:14
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/datetime.xml, last change in rev 1.2 -->
<refentry id="function.gmstrftime">
<refnamediv>
@@ -25,9 +25,11 @@
<title><function>gmstrftime</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
setlocale (LC_TIME, 'en_US');
echo strftime ("%b %d %Y %H:%M:%S", mktime (20,0,0,12,31,98))."\n";
echo gmstrftime ("%b %d %Y %H:%M:%S", mktime (20,0,0,12,31,98))."\n";
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/datetime/functions/microtime.xml
diff -u phpdoc/en/reference/datetime/functions/microtime.xml:1.2
phpdoc/en/reference/datetime/functions/microtime.xml:1.3
--- phpdoc/en/reference/datetime/functions/microtime.xml:1.2 Wed Apr 17 02:37:11
2002
+++ phpdoc/en/reference/datetime/functions/microtime.xml Fri Mar 21 10:46:14
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/datetime.xml, last change in rev 1.2 -->
<refentry id="function.microtime">
<refnamediv>
@@ -26,6 +26,7 @@
<title><function>microtime</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
@@ -41,6 +42,7 @@
$time = $time_end - $time_start;
echo "Did nothing in $time seconds";
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/datetime/functions/mktime.xml
diff -u phpdoc/en/reference/datetime/functions/mktime.xml:1.3
phpdoc/en/reference/datetime/functions/mktime.xml:1.4
--- phpdoc/en/reference/datetime/functions/mktime.xml:1.3 Tue Feb 25 20:53:48
2003
+++ phpdoc/en/reference/datetime/functions/mktime.xml Fri Mar 21 10:46:14 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/datetime.xml, last change in rev 1.2 -->
<refentry id="function.mktime">
<refnamediv>
@@ -57,10 +57,12 @@
<title><function>mktime</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
echo date ("M-d-Y", mktime (0,0,0,12,32,1997));
echo date ("M-d-Y", mktime (0,0,0,13,1,1997));
echo date ("M-d-Y", mktime (0,0,0,1,1,1998));
echo date ("M-d-Y", mktime (0,0,0,1,1,98));
+?>
]]>
</programlisting>
</example>
@@ -88,11 +90,13 @@
<title>Last day of next month</title>
<programlisting role="php">
<![CDATA[
+<?php
$lastday = mktime (0,0,0,3,0,2000);
echo strftime ("Last day in Feb 2000 is: %d", $lastday);
$lastday = mktime (0,0,0,4,-31,2000);
echo strftime ("Last day in Feb 2000 is: %d", $lastday);
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/datetime/functions/strftime.xml
diff -u phpdoc/en/reference/datetime/functions/strftime.xml:1.5
phpdoc/en/reference/datetime/functions/strftime.xml:1.6
--- phpdoc/en/reference/datetime/functions/strftime.xml:1.5 Tue Dec 31 14:18:14
2002
+++ phpdoc/en/reference/datetime/functions/strftime.xml Fri Mar 21 10:46:14 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/datetime.xml, last change in rev 1.2 -->
<refentry id="function.strftime">
<refnamediv>
@@ -245,6 +245,7 @@
<title><function>strftime</function> locale examples</title>
<programlisting role="php">
<![CDATA[
+<?php
setlocale (LC_TIME, "C");
print (strftime ("%A in Finnish is "));
setlocale (LC_TIME, "fi_FI");
@@ -253,6 +254,7 @@
print (strftime ("%A and in German "));
setlocale (LC_TIME, "de_DE");
print (strftime ("%A.\n"));
+?>
]]>
</programlisting>
</example>
Index: phpdoc/en/reference/datetime/functions/strtotime.xml
diff -u phpdoc/en/reference/datetime/functions/strtotime.xml:1.2
phpdoc/en/reference/datetime/functions/strtotime.xml:1.3
--- phpdoc/en/reference/datetime/functions/strtotime.xml:1.2 Wed Apr 17 02:37:12
2002
+++ phpdoc/en/reference/datetime/functions/strtotime.xml Fri Mar 21 10:46:14
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/datetime.xml, last change in rev 1.8 -->
<refentry id="function.strtotime">
<refnamediv>
@@ -34,6 +34,7 @@
<title><function>strtotime</function> examples</title>
<programlisting role="php">
<![CDATA[
+<?php
echo strtotime ("now"), "\n";
echo strtotime ("10 September 2000"), "\n";
echo strtotime ("+1 day"), "\n";
@@ -41,6 +42,7 @@
echo strtotime ("+1 week 2 days 4 hours 2 seconds"), "\n";
echo strtotime ("next Thursday"), "\n";
echo strtotime ("last Monday"), "\n";
+?>
]]>
</programlisting>
</example>
@@ -50,12 +52,14 @@
<title>Checking for failure</title>
<programlisting role="php">
<![CDATA[
+<?php
$str = 'Not Good';
if (($timestamp = strtotime($str)) === -1) {
echo "The string ($str) is bogus";
} else {
echo "$str == ". date('l dS of F Y h:i:s A',$timestamp);
}
+?>
]]>
</programlisting>
</example>
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php