php-doc-en/reference/datetime/functions/getdate.xml
Hartmut Holzgraefe 5b9fc29465 revision tags added
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@78496 c90b9560-bf6c-de11-be94-00142212c4b1
2002-04-17 06:45:35 +00:00

109 lines
2.7 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- splitted from ./en/functions/datetime.xml, last change in rev 1.2 -->
<refentry id="function.getdate">
<refnamediv>
<refname>getdate</refname>
<refpurpose>Get date/time information</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>getdate</methodname>
<methodparam choice="opt"><type>int</type><parameter>timestamp</parameter></methodparam>
</methodsynopsis>
<para>
Returns an associative array containing the date information of
the <parameter>timestamp</parameter>, or the current local time if
no timestamp is given, as the following array
elements:
<itemizedlist>
<listitem>
<simpara>
"seconds" - seconds
</simpara>
</listitem>
<listitem>
<simpara>
"minutes" - minutes
</simpara>
</listitem>
<listitem>
<simpara>
"hours" - hours
</simpara>
</listitem>
<listitem>
<simpara>
"mday" - day of the month
</simpara>
</listitem>
<listitem>
<simpara>
"wday" - day of the week, numeric : from 0 as Sunday up to 6 as Saturday
</simpara>
</listitem>
<listitem>
<simpara>
"mon" - month, numeric
</simpara>
</listitem>
<listitem>
<simpara>
"year" - year, numeric
</simpara>
</listitem>
<listitem>
<simpara>
"yday" - day of the year, numeric; i.e. "299"
</simpara>
</listitem>
<listitem>
<simpara>
"weekday" - day of the week, textual, full; i.e. "Friday"
</simpara>
</listitem>
<listitem>
<simpara>
"month" - month, textual, full; i.e. "January"
</simpara>
</listitem>
</itemizedlist>
<example>
<title>
<function>getdate</function> example
</title>
<programlisting role="php">
<![CDATA[
$today = getdate();
$month = $today['month'];
$mday = $today['mday'];
$year = $today['year'];
echo "$month $mday, $year";
]]>
</programlisting>
</example>
</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:"../../../../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
-->