php-doc-en/reference/datetime/functions/date-parse-from-format.xml
Adam Harvey 18731686ea Fix doc bug (All date acceptance functions should cross-reference
checkdate()) by cross referencing checkdate().


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@309064 c90b9560-bf6c-de11-be94-00142212c4b1
2011-03-10 07:13:07 +00:00

129 lines
2.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.date-parse-from-format" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>date_parse_from_format</refname>
<refpurpose>Get info about given date formatted according to the specified format</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>date_parse_from_format</methodname>
<methodparam><type>string</type><parameter>format</parameter></methodparam>
<methodparam><type>string</type><parameter>date</parameter></methodparam>
</methodsynopsis>
<para>
Returns associative array with detailed info about given date.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>format</parameter></term>
<listitem>
<para>
Format accepted by <function>DateTime::createFromFormat</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>date</parameter></term>
<listitem>
<para>
String representing the date.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<!-- See also &return.success; -->
<para>
Returns associative array with detailed info about given date.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>date_parse_from_format</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$date = "6.1.2009 13:00+01:00";
print_r(date_parse_from_format("j.n.Y H:iP", $date));
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Array
(
[year] => 2009
[month] => 1
[day] => 6
[hour] => 13
[minute] => 0
[second] => 0
[fraction] =>
[warning_count] => 0
[warnings] => Array
(
)
[error_count] => 0
[errors] => Array
(
)
[is_localtime] => 1
[zone_type] => 1
[zone] => -60
[is_dst] =>
)
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>DateTime::createFromFormat</function></member>
<member><function>checkdate</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->