svn: /phpdoc/en/trunk/reference/datetime/functions/ date-create.xml
| From: | Daniel Convissor | Date: | Thu, 29 Apr 2010 01:35:35 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/datetime/functions/ date-create.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-6516@lists.php.net to get a copy of this message | ||
danielc Thu, 29 Apr 2010 01:35:35 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=298745
Log:
Make date_create an alias to construct, just like the rest of the date time functions; this function
is now fully documented on construct page.
Changed paths:
U phpdoc/en/trunk/reference/datetime/functions/date-create.xml
Modified: phpdoc/en/trunk/reference/datetime/functions/date-create.xml
===================================================================
--- phpdoc/en/trunk/reference/datetime/functions/date-create.xml 2010-04-29 01:03:21 UTC (rev
298744)
+++ phpdoc/en/trunk/reference/datetime/functions/date-create.xml 2010-04-29 01:35:35 UTC (rev
298745)
@@ -3,74 +3,16 @@
<refentry xml:id="function.date-create" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>date_create</refname>
- <refpurpose>Returns new DateTime object</refpurpose>
+ <refpurpose>&Alias;
<methodname>DateTime::__construct</methodname></refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
- <methodsynopsis>
- <type>DateTime</type><methodname>date_create</methodname>
- <methodparam
choice="opt"><type>string</type><parameter>time</parameter><initializer>"now"</initializer></methodparam>
- <methodparam
choice="opt"><type>DateTimeZone</type><parameter>timezone</parameter><initializer>NULL</initializer></methodparam>
- </methodsynopsis>
- </refsect1>
-
- <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.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
+ &info.function.alias; <methodname>DateTime::__construct</methodname>
</para>
</refsect1>
- <refsect1 role="returnvalues">
- &reftitle.returnvalues;
- <para>
- Returns DateTime object on success&return.falseforfailure;.
- </para>
- </refsect1>
-
- <refsect1 role="examples">
- &reftitle.examples;
- <para>
- <example>
- <title><function>date_create</function> example</title>
- <programlisting role="php">
-<![CDATA[
-<?php
-date_default_timezone_set('Europe/London');
-
-$datetime = date_create('2008-08-03 14:52:10');
-echo date_format($datetime, DATE_ATOM);
-?>
-]]>
- </programlisting>
- &example.outputs;
- <screen>
-<![CDATA[
-2008-08-03T14:52:10+01:00
-]]>
- </screen>
- </example>
- </para>
- </refsect1>
-
</refentry>
<!-- Keep this comment at the end of the file