Remove unnecessary para's (around variablelist, informaltable, example, simplelist) in DateTime object docs per discussion on php-doc list.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@298364 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Daniel Convissor 2010-04-23 03:06:33 +00:00
parent 7896516687
commit f924f5b494
17 changed files with 500 additions and 598 deletions

View file

@ -29,21 +29,19 @@
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
&date.datetime.description;
<varlistentry>
<term>
<parameter>interval</parameter>
</term>
<listitem>
<para>
A <classname>DateInterval</classname> object
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<variablelist>
&date.datetime.description;
<varlistentry>
<term>
<parameter>interval</parameter>
</term>
<listitem>
<para>
A <classname>DateInterval</classname> object
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
@ -55,10 +53,9 @@
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>date_add</function> example</title>
<programlisting role="php">
<example>
<title><function>date_add</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$date = new DateTime("18-July-2008 16:30:30");
@ -80,19 +77,16 @@ date_add($date, new DateInterval("P5YT5H"));
echo '<br />'.$date->format("d-m-Y H:i:s").' : 5 Years, 5 Hours';
?>
]]>
</programlisting>
</example>
</para>
</programlisting>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>DateTime::sub</function></member>
<member><function>DateTime::diff</function></member>
</simplelist>
</para>
<simplelist>
<member><function>DateTime::sub</function></member>
<member><function>DateTime::diff</function></member>
</simplelist>
</refsect1>
</refentry>

View file

@ -21,30 +21,28 @@
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>time</parameter></term>
<listitem>
<para>
String in a format accepted by <function>strtotime</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>timezone</parameter></term>
<listitem>
<para>
Time zone of the time. If <parameter>$timezone</parameter> is omitted,
the current timezone will be used. The <parameter>$timezone</parameter>
parameter will be ignored if a timezone is specified in the
<parameter>$time</parameter> parameter (e.g. using
<literal>2010-01-28T15:00:00+02:00</literal>).
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<variablelist>
<varlistentry>
<term><parameter>time</parameter></term>
<listitem>
<para>
String in a format accepted by <function>strtotime</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>timezone</parameter></term>
<listitem>
<para>
Time zone of the time. If <parameter>$timezone</parameter> is omitted,
the current timezone will be used. The <parameter>$timezone</parameter>
parameter will be ignored if a timezone is specified in the
<parameter>$time</parameter> parameter (e.g. using
<literal>2010-01-28T15:00:00+02:00</literal>).
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="errors">
@ -56,10 +54,9 @@
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>DateTime::__construct</function> example</title>
<programlisting role="php">
<example>
<title><function>DateTime::__construct</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
date_default_timezone_set('Europe/London');
@ -68,25 +65,24 @@ $datetime = new DateTime('2008-08-03 14:52:10');
echo $datetime->format(DATE_ATOM);
?>
]]>
</programlisting>
</example>
</programlisting>
</example>
<example>
<title>Creating <classname>DateTime</classname> from a UNIX timestamp</title>
<para>
To create a <classname>DateTime</classname> object from a UNIX timestamp
use the <function>strtotime</function> <literal>@</literal> keyword.
</para>
<programlisting role="php">
<example>
<title>Creating <classname>DateTime</classname> from a UNIX timestamp</title>
<para>
To create a <classname>DateTime</classname> object from a UNIX timestamp
use the <function>strtotime</function> <literal>@</literal> keyword.
</para>
<programlisting role="php">
<![CDATA[
<?php
$timestamp = $_SERVER["REQUEST_TIME"];
$dt = new DateTime("@$timestamp");
?>
]]>
</programlisting>
</example>
</para>
</programlisting>
</example>
</refsect1>
</refentry>

View file

@ -22,58 +22,56 @@
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>format</parameter></term>
<listitem>
<para>
Format accepted by <function>date</function>.
</para>
<para>
If <parameter>format</parameter> does not contain the character
<literal>!</literal> then portions of the date/time value
specified in <parameter>format</parameter> but not specified
in <parameter>time</parameter> will be set to the current
system time.
</para>
<para>
If <parameter>format</parameter> contains the
character <literal>!</literal>, then portions of the generated
time specified to the left-hand side of
the <literal>!</literal> in <parameter>format</parameter> will
be set to corresponding values from the Unix epoch.
</para>
<para>
If the first character of <parameter>format</parameter>
is <literal>!</literal>, then all portions of the date/time
value generated which are not specified in
<parameter>time</parameter> will be initialized to corresponding
values from the Unix epoch.
</para>
<para>
The Unix epoch is 1970-01-01 00:00:00 UTC.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>time</parameter></term>
<listitem>
<para>
String representing the time.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>timezone</parameter></term>
<listitem>
<para>
Time zone.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<variablelist>
<varlistentry>
<term><parameter>format</parameter></term>
<listitem>
<para>
Format accepted by <function>date</function>.
</para>
<para>
If <parameter>format</parameter> does not contain the character
<literal>!</literal> then portions of the date/time value
specified in <parameter>format</parameter> but not specified
in <parameter>time</parameter> will be set to the current
system time.
</para>
<para>
If <parameter>format</parameter> contains the
character <literal>!</literal>, then portions of the generated
time specified to the left-hand side of
the <literal>!</literal> in <parameter>format</parameter> will
be set to corresponding values from the Unix epoch.
</para>
<para>
If the first character of <parameter>format</parameter>
is <literal>!</literal>, then all portions of the date/time
value generated which are not specified in
<parameter>time</parameter> will be initialized to corresponding
values from the Unix epoch.
</para>
<para>
The Unix epoch is 1970-01-01 00:00:00 UTC.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>time</parameter></term>
<listitem>
<para>
String representing the time.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>timezone</parameter></term>
<listitem>
<para>
Time zone.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
@ -85,10 +83,9 @@
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Using <literal>!</literal> to reset default date/time values</title>
<programlisting role="php">
<example>
<title>Using <literal>!</literal> to reset default date/time values</title>
<programlisting role="php">
<![CDATA[
<?php
echo "Current system date and time: " . date('Y-m-d H:i:s') . "\n";
@ -110,12 +107,12 @@ $dt = DateTime::createFromFormat($format, '2009-02-03');
echo "Format: $format; " . $dt->date . "\n";
?>
]]>
</programlisting>
<para>
The above example will output something like the following
(taking into account the current system time):
</para>
<screen>
</programlisting>
<para>
The above example will output something like the following
(taking into account the current system time):
</para>
<screen>
<![CDATA[
Current system date and time: 2009-09-13 01:04:03
Format: Y-m-d; 2009-02-03 01:04:03
@ -123,19 +120,16 @@ Format: Y-m-d H:i:s; 2009-02-03 15:16:17
Format: Y-m-!d H:i:s; 1970-01-03 15:16:17
Format: !Y-m-d; 2009-02-03 00:00:00
]]>
</screen>
</example>
</para>
</screen>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><methodname>DateTime::__construct</methodname></member>
<member><methodname>DateTime::getLastErrors</methodname></member>
</simplelist>
</para>
<simplelist>
<member><methodname>DateTime::__construct</methodname></member>
<member><methodname>DateTime::getLastErrors</methodname></member>
</simplelist>
</refsect1>
</refentry>

View file

@ -29,26 +29,24 @@
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>datetime</parameter></term>
<listitem>
<para>
The date to compare to.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>absolute</parameter></term>
<listitem>
<para>
Whether to return absolute difference.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<variablelist>
<varlistentry>
<term><parameter>datetime</parameter></term>
<listitem>
<para>
The date to compare to.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>absolute</parameter></term>
<listitem>
<para>
Whether to return absolute difference.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
@ -96,13 +94,11 @@ echo $interval->format('%R%d days');
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>DateInterval::format</function></member>
<member><function>DateTime::add</function></member>
<member><function>DateTime::sub</function></member>
</simplelist>
</para>
<simplelist>
<member><function>DateInterval::format</function></member>
<member><function>DateTime::add</function></member>
<member><function>DateTime::sub</function></member>
</simplelist>
</refsect1>
</refentry>

View file

@ -22,19 +22,17 @@
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
&date.datetime.description;
<varlistentry>
<term><parameter>format</parameter></term>
<listitem>
<para>
Format accepted by <function>date</function>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<variablelist>
&date.datetime.description;
<varlistentry>
<term><parameter>format</parameter></term>
<listitem>
<para>
Format accepted by <function>date</function>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
@ -46,10 +44,9 @@
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Displaying the date and time using the procedural form</title>
<programlisting role="php">
<example>
<title>Displaying the date and time using the procedural form</title>
<programlisting role="php">
<![CDATA[
<?php
date_default_timezone_set('Europe/London');
@ -59,13 +56,11 @@ echo date_format($datetime, 'jS, F Y') . "\n";
echo date_format($datetime, DATE_ATOM);
?>
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title>Displaying the date and time using the object oriented form</title>
<programlisting role="php">
</programlisting>
</example>
<example>
<title>Displaying the date and time using the object oriented form</title>
<programlisting role="php">
<![CDATA[
<?php
date_default_timezone_set('Europe/London');
@ -76,25 +71,22 @@ echo $datetime->format(DATE_ATOM);
?>
?>
]]>
</programlisting>
&example.outputs;
<screen>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
3rd, August 2008
2008-08-03T14:52:10+01:00
]]>
</screen>
</example>
</para>
</screen>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>date</function></member>
</simplelist>
</para>
<simplelist>
<member><function>date</function></member>
</simplelist>
</refsect1>
</refentry>

View file

@ -32,39 +32,37 @@
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>DateTime::getLastErrors</function> example</title>
<programlisting role="php">
<example>
<title><function>DateTime::getLastErrors</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$date = date_create('asdfasdf');
print_r(DateTime::getLastErrors());
?>
]]>
</programlisting>
&example.outputs;
<screen>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Array
(
[warning_count] => 1
[warnings] => Array
(
[6] => Double timezone specification
)
[warning_count] => 1
[warnings] => Array
(
[6] => Double timezone specification
)
[error_count] => 1
[errors] => Array
(
[0] => The timezone could not be found in the database
)
[error_count] => 1
[errors] => Array
(
[0] => The timezone could not be found in the database
)
)
]]>
</screen>
</example>
</para>
</screen>
</example>
</refsect1>
</refentry>

View file

@ -20,11 +20,9 @@
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
&date.datetime.description;
</variablelist>
</para>
<variablelist>
&date.datetime.description;
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
@ -37,10 +35,9 @@
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Comparing offsets between Summer and Winter</title>
<programlisting role="php">
<example>
<title>Comparing offsets between Summer and Winter</title>
<programlisting role="php">
<![CDATA[
<?php
date_default_timezone_set('Europe/London');
@ -52,9 +49,8 @@ echo $winter->getOffset(); // Winter offset: 0
echo $summer->getOffset(); // Summer offset: 3600 = 1 hour
?>
]]>
</programlisting>
</example>
</para>
</programlisting>
</example>
</refsect1>
</refentry>

View file

@ -32,11 +32,9 @@
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><methodname>DateTime::setTimestamp</methodname></member>
</simplelist>
</para>
<simplelist>
<member><methodname>DateTime::setTimestamp</methodname></member>
</simplelist>
</refsect1>
</refentry>

View file

@ -21,11 +21,9 @@
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
&date.datetime.description;
</variablelist>
</para>
<variablelist>
&date.datetime.description;
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
@ -37,10 +35,9 @@
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Setting and getting DateTimeZone objects</title>
<programlisting role="php">
<example>
<title>Setting and getting DateTimeZone objects</title>
<programlisting role="php">
<![CDATA[
<?php
date_default_timezone_set('Europe/London');
@ -54,26 +51,23 @@ $datetime->setTimezone($la_time);
echo $datetime->getTimezone()->getName();
?>
]]>
</programlisting>
&example.outputs;
<screen>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Europe/London
America/Los_Angeles
]]>
</screen>
</example>
</para>
</screen>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>DateTime::setTimezone</function></member>
<member><function>timezone_open</function></member>
</simplelist>
</para>
<simplelist>
<member><function>DateTime::setTimezone</function></member>
<member><function>timezone_open</function></member>
</simplelist>
</refsect1>
</refentry>

View file

@ -26,19 +26,17 @@
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
&date.datetime.description;
<varlistentry>
<term><parameter>modify</parameter></term>
<listitem>
<para>
String in a relative format accepted by <function>strtotime</function>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<variablelist>
&date.datetime.description;
<varlistentry>
<term><parameter>modify</parameter></term>
<listitem>
<para>
String in a relative format accepted by <function>strtotime</function>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
@ -50,29 +48,26 @@
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&date.datetime.retval.changelog;
</tbody>
</tgroup>
</informaltable>
</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&date.datetime.retval.changelog;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>date_modify</function> example</title>
<programlisting role="php">
<example>
<title>A <function>date_modify</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$date = new DateTime("2006-12-12");
@ -80,24 +75,21 @@ $date->modify("+1 day");
echo $date->format("Y-m-d");
?>
]]>
</programlisting>
&example.outputs;
<screen>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
2006-12-13
]]>
</screen>
</example>
</para>
</screen>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>strtotime</function></member>
</simplelist>
</para>
<simplelist>
<member><function>strtotime</function></member>
</simplelist>
</refsect1>
</refentry>

View file

@ -20,18 +20,16 @@
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>array</parameter></term>
<listitem>
<para>
Initialization array.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<variablelist>
<varlistentry>
<term><parameter>array</parameter></term>
<listitem>
<para>
Initialization array.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">

View file

@ -29,35 +29,33 @@
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
&date.datetime.description;
<varlistentry>
<term><parameter>year</parameter></term>
<listitem>
<para>
Year of the date.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>month</parameter></term>
<listitem>
<para>
Month of the date.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>day</parameter></term>
<listitem>
<para>
Day of the date.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<variablelist>
&date.datetime.description;
<varlistentry>
<term><parameter>year</parameter></term>
<listitem>
<para>
Year of the date.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>month</parameter></term>
<listitem>
<para>
Month of the date.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>day</parameter></term>
<listitem>
<para>
Day of the date.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
@ -69,29 +67,26 @@
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&date.datetime.retval.changelog;
</tbody>
</tgroup>
</informaltable>
</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&date.datetime.retval.changelog;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Object oriented example usage</title>
<programlisting role="php">
<example>
<title>Object oriented example usage</title>
<programlisting role="php">
<![CDATA[
<?php
date_default_timezone_set('Europe/London');
@ -102,13 +97,11 @@ $datetime->setDate(2008, 10, 12);
echo $datetime->format(DATE_RFC2822);
?>
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title>Procedural example usage</title>
<programlisting role="php">
</programlisting>
</example>
<example>
<title>Procedural example usage</title>
<programlisting role="php">
<![CDATA[
<?php
date_default_timezone_set('Europe/London');
@ -119,25 +112,22 @@ date_date_set($datetime, 2008, 10, 12);
echo date_format($datetime, DATE_RFC2822);
?>
]]>
</programlisting>
&example.outputs;
<screen>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Sun, 12 Oct 2008 14:52:10 +0100
]]>
</screen>
</example>
</para>
</screen>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>DateTime::setISODate</function></member>
<member><function>DateTime::setTime</function></member>
</simplelist>
</para>
<simplelist>
<member><function>DateTime::setISODate</function></member>
<member><function>DateTime::setTime</function></member>
</simplelist>
</refsect1>
</refentry>

View file

@ -30,35 +30,33 @@
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
&date.datetime.description;
<varlistentry>
<term><parameter>year</parameter></term>
<listitem>
<para>
Year of the date.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>week</parameter></term>
<listitem>
<para>
Week of the date.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>day</parameter></term>
<listitem>
<para>
Offset from the first day of the week.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<variablelist>
&date.datetime.description;
<varlistentry>
<term><parameter>year</parameter></term>
<listitem>
<para>
Year of the date.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>week</parameter></term>
<listitem>
<para>
Week of the date.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>day</parameter></term>
<listitem>
<para>
Offset from the first day of the week.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
@ -70,29 +68,26 @@
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&date.datetime.retval.changelog;
</tbody>
</tgroup>
</informaltable>
</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&date.datetime.retval.changelog;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Finding the date from a week number and day offset</title>
<programlisting role="php">
<example>
<title>Finding the date from a week number and day offset</title>
<programlisting role="php">
<![CDATA[
<?php
date_default_timezone_set('Europe/London');
@ -106,13 +101,11 @@ $datetime->setISODate(2008, 2, 5); // Day 5 of week 2 of 2008 is the 11th of Jan
$datetime->setISODate(2008, 2, 10); // Day 10 of week 2 of 2008 is the 16th of January.
?>
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title>Finding the month a week is in</title>
<programlisting role="php">
</programlisting>
</example>
<example>
<title>Finding the month a week is in</title>
<programlisting role="php">
<![CDATA[
<?php
date_default_timezone_set('Europe/London');
@ -121,18 +114,15 @@ $datetime = date_create();
date_isodate_set($datetime, 2008, 6); // Week 6 of 2008 is in February.
?>
]]>
</programlisting>
</example>
</para>
</programlisting>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>DateTime::setDate</function></member>
</simplelist>
</para>
<simplelist>
<member><function>DateTime::setDate</function></member>
</simplelist>
</refsect1>
</refentry>

View file

@ -29,35 +29,33 @@
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
&date.datetime.description;
<varlistentry>
<term><parameter>hour</parameter></term>
<listitem>
<para>
Hour of the time.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>minute</parameter></term>
<listitem>
<para>
Minute of the time.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>second</parameter></term>
<listitem>
<para>
Second of the time.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<variablelist>
&date.datetime.description;
<varlistentry>
<term><parameter>hour</parameter></term>
<listitem>
<para>
Hour of the time.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>minute</parameter></term>
<listitem>
<para>
Minute of the time.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>second</parameter></term>
<listitem>
<para>
Second of the time.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
@ -69,29 +67,26 @@
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&date.datetime.retval.changelog;
</tbody>
</tgroup>
</informaltable>
</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&date.datetime.retval.changelog;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Changing the time of a DateTime object</title>
<programlisting role="php">
<example>
<title>Changing the time of a DateTime object</title>
<programlisting role="php">
<![CDATA[
<?php
date_default_timezone_set('Europe/London');
@ -112,27 +107,24 @@ $datetime->setTime($datetime->format('H') + 12, $datetime->format('n'));
echo $datetime->format('Y-m-d H:i:s') . "\n";
?>
]]>
</programlisting>
&example.outputs;
<screen>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
2008-08-03 12:35:23
2008-08-03 14:55:24
2008-08-03 14:14:00
2008-08-04 02:08:00
]]>
</screen>
</example>
</para>
</screen>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>DateTime::setDate</function></member>
</simplelist>
</para>
<simplelist>
<member><function>DateTime::setDate</function></member>
</simplelist>
</refsect1>
</refentry>

View file

@ -20,18 +20,16 @@
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>unixtimestamp</parameter></term>
<listitem>
<para>
Unix timestamp representing the date.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<variablelist>
<varlistentry>
<term><parameter>unixtimestamp</parameter></term>
<listitem>
<para>
Unix timestamp representing the date.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
@ -43,11 +41,9 @@
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><methodname>DateTime::getTimestamp</methodname></member>
</simplelist>
</para>
<simplelist>
<member><methodname>DateTime::getTimestamp</methodname></member>
</simplelist>
</refsect1>
</refentry>

View file

@ -22,19 +22,17 @@
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
&date.datetime.description;
<varlistentry>
<term><parameter>timezone</parameter></term>
<listitem>
<para>
Desired time zone.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<variablelist>
&date.datetime.description;
<varlistentry>
<term><parameter>timezone</parameter></term>
<listitem>
<para>
Desired time zone.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
@ -46,35 +44,32 @@
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>5.3.0</entry>
<entry>
Changed the return value from &null; to
<classname>DateTime</classname>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>5.3.0</entry>
<entry>
Changed the return value from &null; to
<classname>DateTime</classname>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Setting and getting DateTimeZone objects</title>
<programlisting role="php">
<example>
<title>Setting and getting DateTimeZone objects</title>
<programlisting role="php">
<![CDATA[
<?php
date_default_timezone_set('Europe/London');
@ -88,26 +83,23 @@ $datetime->setTimezone($la_time);
echo $datetime->getTimezone()->getName();
?>
]]>
</programlisting>
&example.outputs;
<screen>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Europe/London
America/Los_Angeles
]]>
</screen>
</example>
</para>
</screen>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>DateTime::getTimezone</function></member>
<member><function>timezone_open</function></member>
</simplelist>
</para>
<simplelist>
<member><function>DateTime::getTimezone</function></member>
<member><function>timezone_open</function></member>
</simplelist>
</refsect1>
</refentry>

View file

@ -29,21 +29,19 @@
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
&date.datetime.description;
<varlistentry>
<term>
<parameter>interval</parameter>
</term>
<listitem>
<para>
A <classname>DateInterval</classname> object
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<variablelist>
&date.datetime.description;
<varlistentry>
<term>
<parameter>interval</parameter>
</term>
<listitem>
<para>
A <classname>DateInterval</classname> object
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
@ -55,10 +53,9 @@
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>date_sub</function> example</title>
<programlisting role="php">
<example>
<title><function>date_sub</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
@ -82,19 +79,16 @@ echo '<br />'.$date->format("d-m-Y H:i:s").' : 5 Years, 5 Hours';
?>
]]>
</programlisting>
</example>
</para>
</programlisting>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>DateTime::add</function></member>
<member><function>DateTime::diff</function></member>
</simplelist>
</para>
<simplelist>
<member><function>DateTime::add</function></member>
<member><function>DateTime::diff</function></member>
</simplelist>
</refsect1>
</refentry>