<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<refentry xml:id="function.checkdate" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>checkdate</refname>
  <refpurpose>Validate a Gregorian date</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>bool</type><methodname>checkdate</methodname>
   <methodparam><type>int</type><parameter>month</parameter></methodparam>
   <methodparam><type>int</type><parameter>day</parameter></methodparam>
   <methodparam><type>int</type><parameter>year</parameter></methodparam>
  </methodsynopsis>
  <para>
   Checks the validity of the date formed by the arguments. A date
   is considered valid if each parameter is properly defined.
  </para>
 </refsect1>
 
 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>month</parameter></term>
     <listitem>
      <para>
       The month is between 1 and 12 inclusive.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>day</parameter></term>
     <listitem>
      <para>
       The day is within the allowed number of days for the given 
       <parameter>month</parameter>.  Leap <parameter>year</parameter>s 
       are taken into consideration.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>year</parameter></term>
     <listitem>
      <para>
       The year is between 1 and 32767 inclusive.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns &true; if the date given is valid; otherwise returns &false;.
  </para>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
    <title><function>checkdate</function> example</title>
    <programlisting role="php">
<![CDATA[
<?php
var_dump(checkdate(12, 31, 2000));
var_dump(checkdate(2, 29, 2001));
?>
]]>
    </programlisting>
    &example.outputs;
    <screen>
<![CDATA[
bool(true)
bool(false)
]]>
    </screen>
   </example>
  </para>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>mktime</function></member>
    <member><function>strtotime</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:"../../../../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
-->