mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@298745 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
9442a1ead5
commit
03ab3321ba
1 changed files with 2 additions and 60 deletions
|
@ -3,71 +3,13 @@
|
|||
<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>
|
||||
</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>
|
||||
&info.function.alias; <methodname>DateTime::__construct</methodname>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
|
Loading…
Reference in a new issue