From f924f5b494869b11b78a8666ca38200b8a6a08d1 Mon Sep 17 00:00:00 2001 From: Daniel Convissor Date: Fri, 23 Apr 2010 03:06:33 +0000 Subject: [PATCH] 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 --- reference/datetime/datetime/add.xml | 50 +++---- reference/datetime/datetime/construct.xml | 76 +++++----- .../datetime/datetime/createfromformat.xml | 136 +++++++++--------- reference/datetime/datetime/diff.xml | 50 +++---- reference/datetime/datetime/format.xml | 62 ++++---- reference/datetime/datetime/getlasterrors.xml | 38 +++-- reference/datetime/datetime/getoffset.xml | 20 ++- reference/datetime/datetime/gettimestamp.xml | 8 +- reference/datetime/datetime/gettimezone.xml | 36 ++--- reference/datetime/datetime/modify.xml | 78 +++++----- reference/datetime/datetime/set-state.xml | 22 ++- reference/datetime/datetime/setdate.xml | 124 ++++++++-------- reference/datetime/datetime/setisodate.xml | 116 +++++++-------- reference/datetime/datetime/settime.xml | 110 +++++++------- reference/datetime/datetime/settimestamp.xml | 30 ++-- reference/datetime/datetime/settimezone.xml | 92 ++++++------ reference/datetime/datetime/sub.xml | 50 +++---- 17 files changed, 500 insertions(+), 598 deletions(-) diff --git a/reference/datetime/datetime/add.xml b/reference/datetime/datetime/add.xml index 61c69dfe66..c0d1f117ce 100644 --- a/reference/datetime/datetime/add.xml +++ b/reference/datetime/datetime/add.xml @@ -29,21 +29,19 @@ &reftitle.parameters; - - - &date.datetime.description; - - - interval - - - - A DateInterval object - - - - - + + &date.datetime.description; + + + interval + + + + A DateInterval object + + + + @@ -55,10 +53,9 @@ &reftitle.examples; - - - <function>date_add</function> example - + + <function>date_add</function> example + '.$date->format("d-m-Y H:i:s").' : 5 Years, 5 Hours'; ?> ]]> - - - + + &reftitle.seealso; - - - DateTime::sub - DateTime::diff - - + + DateTime::sub + DateTime::diff + diff --git a/reference/datetime/datetime/construct.xml b/reference/datetime/datetime/construct.xml index cf8e68d097..745f5be033 100644 --- a/reference/datetime/datetime/construct.xml +++ b/reference/datetime/datetime/construct.xml @@ -21,30 +21,28 @@ &reftitle.parameters; - - - - time - - - String in a format accepted by strtotime. - - - - - timezone - - - Time zone of the time. If $timezone is omitted, - the current timezone will be used. The $timezone - parameter will be ignored if a timezone is specified in the - $time parameter (e.g. using - 2010-01-28T15:00:00+02:00). - - - - - + + + time + + + String in a format accepted by strtotime. + + + + + timezone + + + Time zone of the time. If $timezone is omitted, + the current timezone will be used. The $timezone + parameter will be ignored if a timezone is specified in the + $time parameter (e.g. using + 2010-01-28T15:00:00+02:00). + + + + @@ -56,10 +54,9 @@ &reftitle.examples; - - - <function>DateTime::__construct</function> example - + + <function>DateTime::__construct</function> example + format(DATE_ATOM); ?> ]]> - - + + - - Creating <classname>DateTime</classname> from a UNIX timestamp - - To create a DateTime object from a UNIX timestamp - use the strtotime @ keyword. - - + + Creating <classname>DateTime</classname> from a UNIX timestamp + + To create a DateTime object from a UNIX timestamp + use the strtotime @ keyword. + + ]]> - - - + + diff --git a/reference/datetime/datetime/createfromformat.xml b/reference/datetime/datetime/createfromformat.xml index 4a56483781..20b9505e29 100644 --- a/reference/datetime/datetime/createfromformat.xml +++ b/reference/datetime/datetime/createfromformat.xml @@ -22,58 +22,56 @@ &reftitle.parameters; - - - - format - - - Format accepted by date. - - - If format does not contain the character - ! then portions of the date/time value - specified in format but not specified - in time will be set to the current - system time. - - - If format contains the - character !, then portions of the generated - time specified to the left-hand side of - the ! in format will - be set to corresponding values from the Unix epoch. - - - If the first character of format - is !, then all portions of the date/time - value generated which are not specified in - time will be initialized to corresponding - values from the Unix epoch. - - - The Unix epoch is 1970-01-01 00:00:00 UTC. - - - - - time - - - String representing the time. - - - - - timezone - - - Time zone. - - - - - + + + format + + + Format accepted by date. + + + If format does not contain the character + ! then portions of the date/time value + specified in format but not specified + in time will be set to the current + system time. + + + If format contains the + character !, then portions of the generated + time specified to the left-hand side of + the ! in format will + be set to corresponding values from the Unix epoch. + + + If the first character of format + is !, then all portions of the date/time + value generated which are not specified in + time will be initialized to corresponding + values from the Unix epoch. + + + The Unix epoch is 1970-01-01 00:00:00 UTC. + + + + + time + + + String representing the time. + + + + + timezone + + + Time zone. + + + + @@ -85,10 +83,9 @@ &reftitle.examples; - - - Using <literal>!</literal> to reset default date/time values - + + Using <literal>!</literal> to reset default date/time values + date . "\n"; ?> ]]> - - - The above example will output something like the following - (taking into account the current system time): - - + + + The above example will output something like the following + (taking into account the current system time): + + - - - + + &reftitle.seealso; - - - DateTime::__construct - DateTime::getLastErrors - - + + DateTime::__construct + DateTime::getLastErrors + diff --git a/reference/datetime/datetime/diff.xml b/reference/datetime/datetime/diff.xml index e630c4e032..826a905b13 100644 --- a/reference/datetime/datetime/diff.xml +++ b/reference/datetime/datetime/diff.xml @@ -29,26 +29,24 @@ &reftitle.parameters; - - - - datetime - - - The date to compare to. - - - - - absolute - - - Whether to return absolute difference. - - - - - + + + datetime + + + The date to compare to. + + + + + absolute + + + Whether to return absolute difference. + + + + @@ -96,13 +94,11 @@ echo $interval->format('%R%d days'); &reftitle.seealso; - - - DateInterval::format - DateTime::add - DateTime::sub - - + + DateInterval::format + DateTime::add + DateTime::sub + diff --git a/reference/datetime/datetime/format.xml b/reference/datetime/datetime/format.xml index 409c37f458..bf18bf19e2 100644 --- a/reference/datetime/datetime/format.xml +++ b/reference/datetime/datetime/format.xml @@ -22,19 +22,17 @@ &reftitle.parameters; - - - &date.datetime.description; - - format - - - Format accepted by date. - - - - - + + &date.datetime.description; + + format + + + Format accepted by date. + + + + @@ -46,10 +44,9 @@ &reftitle.examples; - - - Displaying the date and time using the procedural form - + + Displaying the date and time using the procedural form + ]]> - - - - - - Displaying the date and time using the object oriented form - + + + + Displaying the date and time using the object oriented form + format(DATE_ATOM); ?> ?> ]]> - - &example.outputs; - + + &example.outputs; + - - - + + &reftitle.seealso; - - - date - - + + date + diff --git a/reference/datetime/datetime/getlasterrors.xml b/reference/datetime/datetime/getlasterrors.xml index 2f286de717..afd459e8ea 100644 --- a/reference/datetime/datetime/getlasterrors.xml +++ b/reference/datetime/datetime/getlasterrors.xml @@ -32,39 +32,37 @@ &reftitle.examples; - - - <function>DateTime::getLastErrors</function> example - + + <function>DateTime::getLastErrors</function> example + ]]> - - &example.outputs; - + + &example.outputs; + 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 + ) ) ]]> - - - + + diff --git a/reference/datetime/datetime/getoffset.xml b/reference/datetime/datetime/getoffset.xml index 44507b3f94..591b64c4ad 100644 --- a/reference/datetime/datetime/getoffset.xml +++ b/reference/datetime/datetime/getoffset.xml @@ -20,11 +20,9 @@ &reftitle.parameters; - - - &date.datetime.description; - - + + &date.datetime.description; + @@ -37,10 +35,9 @@ &reftitle.examples; - - - Comparing offsets between Summer and Winter - + + Comparing offsets between Summer and Winter + getOffset(); // Winter offset: 0 echo $summer->getOffset(); // Summer offset: 3600 = 1 hour ?> ]]> - - - + + diff --git a/reference/datetime/datetime/gettimestamp.xml b/reference/datetime/datetime/gettimestamp.xml index b5bc162ad3..745927f73c 100644 --- a/reference/datetime/datetime/gettimestamp.xml +++ b/reference/datetime/datetime/gettimestamp.xml @@ -32,11 +32,9 @@ &reftitle.seealso; - - - DateTime::setTimestamp - - + + DateTime::setTimestamp + diff --git a/reference/datetime/datetime/gettimezone.xml b/reference/datetime/datetime/gettimezone.xml index e2bb83d651..b71e29ec97 100644 --- a/reference/datetime/datetime/gettimezone.xml +++ b/reference/datetime/datetime/gettimezone.xml @@ -21,11 +21,9 @@ &reftitle.parameters; - - - &date.datetime.description; - - + + &date.datetime.description; + @@ -37,10 +35,9 @@ &reftitle.examples; - - - Setting and getting DateTimeZone objects - + + Setting and getting DateTimeZone objects + setTimezone($la_time); echo $datetime->getTimezone()->getName(); ?> ]]> - - &example.outputs; - + + &example.outputs; + - - - + + &reftitle.seealso; - - - DateTime::setTimezone - timezone_open - - + + DateTime::setTimezone + timezone_open + diff --git a/reference/datetime/datetime/modify.xml b/reference/datetime/datetime/modify.xml index 237110d91f..10c40d5ba4 100644 --- a/reference/datetime/datetime/modify.xml +++ b/reference/datetime/datetime/modify.xml @@ -26,19 +26,17 @@ &reftitle.parameters; - - - &date.datetime.description; - - modify - - - String in a relative format accepted by strtotime. - - - - - + + &date.datetime.description; + + modify + + + String in a relative format accepted by strtotime. + + + + @@ -50,29 +48,26 @@ &reftitle.changelog; - - - - - - &Version; - &Description; - - - - &date.datetime.retval.changelog; - - - - + + + + + &Version; + &Description; + + + + &date.datetime.retval.changelog; + + + &reftitle.examples; - - - A <function>date_modify</function> example - + + A <function>date_modify</function> example + modify("+1 day"); echo $date->format("Y-m-d"); ?> ]]> - - &example.outputs; - + + &example.outputs; + - - - + + &reftitle.seealso; - - - strtotime - - + + strtotime + diff --git a/reference/datetime/datetime/set-state.xml b/reference/datetime/datetime/set-state.xml index 8b0c6e43eb..60051e6049 100644 --- a/reference/datetime/datetime/set-state.xml +++ b/reference/datetime/datetime/set-state.xml @@ -20,18 +20,16 @@ &reftitle.parameters; - - - - array - - - Initialization array. - - - - - + + + array + + + Initialization array. + + + + diff --git a/reference/datetime/datetime/setdate.xml b/reference/datetime/datetime/setdate.xml index 9c08f1fb17..4b5ffe7c04 100644 --- a/reference/datetime/datetime/setdate.xml +++ b/reference/datetime/datetime/setdate.xml @@ -29,35 +29,33 @@ &reftitle.parameters; - - - &date.datetime.description; - - year - - - Year of the date. - - - - - month - - - Month of the date. - - - - - day - - - Day of the date. - - - - - + + &date.datetime.description; + + year + + + Year of the date. + + + + + month + + + Month of the date. + + + + + day + + + Day of the date. + + + + @@ -69,29 +67,26 @@ &reftitle.changelog; - - - - - - &Version; - &Description; - - - - &date.datetime.retval.changelog; - - - - + + + + + &Version; + &Description; + + + + &date.datetime.retval.changelog; + + + &reftitle.examples; - - - Object oriented example usage - + + Object oriented example usage + setDate(2008, 10, 12); echo $datetime->format(DATE_RFC2822); ?> ]]> - - - - - - Procedural example usage - + + + + Procedural example usage + ]]> - - &example.outputs; - + + &example.outputs; + - - - + + &reftitle.seealso; - - - DateTime::setISODate - DateTime::setTime - - + + DateTime::setISODate + DateTime::setTime + diff --git a/reference/datetime/datetime/setisodate.xml b/reference/datetime/datetime/setisodate.xml index 0ac63b8a68..633dc80c36 100644 --- a/reference/datetime/datetime/setisodate.xml +++ b/reference/datetime/datetime/setisodate.xml @@ -30,35 +30,33 @@ &reftitle.parameters; - - - &date.datetime.description; - - year - - - Year of the date. - - - - - week - - - Week of the date. - - - - - day - - - Offset from the first day of the week. - - - - - + + &date.datetime.description; + + year + + + Year of the date. + + + + + week + + + Week of the date. + + + + + day + + + Offset from the first day of the week. + + + + @@ -70,29 +68,26 @@ &reftitle.changelog; - - - - - - &Version; - &Description; - - - - &date.datetime.retval.changelog; - - - - + + + + + &Version; + &Description; + + + + &date.datetime.retval.changelog; + + + &reftitle.examples; - - - Finding the date from a week number and day offset - + + Finding the date from a week number and day offset + 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. ?> ]]> - - - - - - Finding the month a week is in - + + + + Finding the month a week is in + ]]> - - - + + &reftitle.seealso; - - - DateTime::setDate - - + + DateTime::setDate + diff --git a/reference/datetime/datetime/settime.xml b/reference/datetime/datetime/settime.xml index 8b9d4d1176..a350bca159 100644 --- a/reference/datetime/datetime/settime.xml +++ b/reference/datetime/datetime/settime.xml @@ -29,35 +29,33 @@ &reftitle.parameters; - - - &date.datetime.description; - - hour - - - Hour of the time. - - - - - minute - - - Minute of the time. - - - - - second - - - Second of the time. - - - - - + + &date.datetime.description; + + hour + + + Hour of the time. + + + + + minute + + + Minute of the time. + + + + + second + + + Second of the time. + + + + @@ -69,29 +67,26 @@ &reftitle.changelog; - - - - - - &Version; - &Description; - - - - &date.datetime.retval.changelog; - - - - + + + + + &Version; + &Description; + + + + &date.datetime.retval.changelog; + + + &reftitle.examples; - - - Changing the time of a DateTime object - + + Changing the time of a DateTime object + setTime($datetime->format('H') + 12, $datetime->format('n')); echo $datetime->format('Y-m-d H:i:s') . "\n"; ?> ]]> - - &example.outputs; - + + &example.outputs; + - - - + + &reftitle.seealso; - - - DateTime::setDate - - + + DateTime::setDate + diff --git a/reference/datetime/datetime/settimestamp.xml b/reference/datetime/datetime/settimestamp.xml index 66f1fe5736..73dccfdc31 100644 --- a/reference/datetime/datetime/settimestamp.xml +++ b/reference/datetime/datetime/settimestamp.xml @@ -20,18 +20,16 @@ &reftitle.parameters; - - - - unixtimestamp - - - Unix timestamp representing the date. - - - - - + + + unixtimestamp + + + Unix timestamp representing the date. + + + + @@ -43,11 +41,9 @@ &reftitle.seealso; - - - DateTime::getTimestamp - - + + DateTime::getTimestamp + diff --git a/reference/datetime/datetime/settimezone.xml b/reference/datetime/datetime/settimezone.xml index ec3271aa50..563935040d 100644 --- a/reference/datetime/datetime/settimezone.xml +++ b/reference/datetime/datetime/settimezone.xml @@ -22,19 +22,17 @@ &reftitle.parameters; - - - &date.datetime.description; - - timezone - - - Desired time zone. - - - - - + + &date.datetime.description; + + timezone + + + Desired time zone. + + + + @@ -46,35 +44,32 @@ &reftitle.changelog; - - - - - - &Version; - &Description; - - - - - 5.3.0 - - Changed the return value from &null; to - DateTime. - - - - - - + + + + + &Version; + &Description; + + + + + 5.3.0 + + Changed the return value from &null; to + DateTime. + + + + + &reftitle.examples; - - - Setting and getting DateTimeZone objects - + + Setting and getting DateTimeZone objects + setTimezone($la_time); echo $datetime->getTimezone()->getName(); ?> ]]> - - &example.outputs; - + + &example.outputs; + - - - + + &reftitle.seealso; - - - DateTime::getTimezone - timezone_open - - + + DateTime::getTimezone + timezone_open + diff --git a/reference/datetime/datetime/sub.xml b/reference/datetime/datetime/sub.xml index db635e1a79..7116822a66 100644 --- a/reference/datetime/datetime/sub.xml +++ b/reference/datetime/datetime/sub.xml @@ -29,21 +29,19 @@ &reftitle.parameters; - - - &date.datetime.description; - - - interval - - - - A DateInterval object - - - - - + + &date.datetime.description; + + + interval + + + + A DateInterval object + + + + @@ -55,10 +53,9 @@ &reftitle.examples; - - - <function>date_sub</function> example - + + <function>date_sub</function> example + '.$date->format("d-m-Y H:i:s").' : 5 Years, 5 Hours'; ?> ]]> - - - + + &reftitle.seealso; - - - DateTime::add - DateTime::diff - - + + DateTime::add + DateTime::diff +