php-doc-en/reference/calendar/functions/cal-days-in-month.xml
Maciek Sokolewicz 87d952ec1b fixed small grammar mistake (incongruency) in example
---
Patch by Nikhil Vimal

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@336260 c90b9560-bf6c-de11-be94-00142212c4b1
2015-03-30 12:14:02 +00:00

101 lines
2.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.cal-days-in-month" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>cal_days_in_month</refname>
<refpurpose>Return the number of days in a month for a given year and calendar</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>cal_days_in_month</methodname>
<methodparam><type>int</type><parameter>calendar</parameter></methodparam>
<methodparam><type>int</type><parameter>month</parameter></methodparam>
<methodparam><type>int</type><parameter>year</parameter></methodparam>
</methodsynopsis>
<para>
This function will return the number of days in the
<parameter>month</parameter> of <parameter>year</parameter> for
the specified <parameter>calendar</parameter>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>calendar</parameter></term>
<listitem>
<para>
Calendar to use for calculation
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>month</parameter></term>
<listitem>
<para>
Month in the selected calendar
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>year</parameter></term>
<listitem>
<para>
Year in the selected calendar
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The length in days of the selected month in the given calendar
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>cal_days_in_month</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$number = cal_days_in_month(CAL_GREGORIAN, 8, 2003); // 31
echo "There were {$number} days in August 2003";
?>
]]>
</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:"~/.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
-->