mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Added param calendar info from note and added example
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@183690 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
91dac5587a
commit
7daa4b26fe
1 changed files with 81 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<!-- splitted from ./en/functions/calendar.xml, last change in rev 1.19 -->
|
||||
<refentry id='function.cal-info'>
|
||||
<refnamediv>
|
||||
|
@ -20,13 +20,92 @@
|
|||
Calendar information is returned as an array containing the
|
||||
elements <literal>calname</literal>, <literal>calsymbol</literal>,
|
||||
<literal>month</literal>, <literal>abbrevmonth</literal> and
|
||||
<literal>maxdaysinmonth</literal>.
|
||||
<literal>maxdaysinmonth</literal>. The names of the different calendars
|
||||
which can be used as <parameter>calendar</parameter> are as follows:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
0 or "CAL_GREGORIAN" - Gregorian Calendar
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
1 or "CAL_JULIAN" - Julian Calendar
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
2 or "CAL_JEWISH" - Jewish Calendar
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
3 or "CAL_FRENCH" - French Revolutionary Calendar
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
If no <parameter>calendar</parameter> is specified information on all
|
||||
supported calendars is returned as an array. This functionality
|
||||
is available beginning with PHP 5.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>cal_info</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$info = cal_info(0);
|
||||
print_r($info);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
(
|
||||
[months] => Array
|
||||
(
|
||||
[1] => January
|
||||
[2] => February
|
||||
[3] => March
|
||||
[4] => April
|
||||
[5] => May
|
||||
[6] => June
|
||||
[7] => July
|
||||
[8] => August
|
||||
[9] => September
|
||||
[10] => October
|
||||
[11] => November
|
||||
[12] => December
|
||||
)
|
||||
|
||||
[abbrevmonths] => Array
|
||||
(
|
||||
[1] => Jan
|
||||
[2] => Feb
|
||||
[3] => Mar
|
||||
[4] => Apr
|
||||
[5] => May
|
||||
[6] => Jun
|
||||
[7] => Jul
|
||||
[8] => Aug
|
||||
[9] => Sep
|
||||
[10] => Oct
|
||||
[11] => Nov
|
||||
[12] => Dec
|
||||
)
|
||||
|
||||
[maxdaysinmonth] => 31
|
||||
[calname] => Gregorian
|
||||
[calsymbol] => CAL_GREGORIAN
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
|
Loading…
Reference in a new issue