⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 function.cal-info.html

📁 php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Returns information about a particular calendar</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.cal-from-jd.html">cal_from_jd</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.cal-to-jd.html">cal_to_jd</a></div> <div class="up"><a href="ref.calendar.html">Calendar Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.cal-info" class="refentry"> <div class="refnamediv">  <h1 class="refname">cal_info</h1>  <p class="verinfo">(PHP 4 &gt;= 4.0.7, PHP 5)</p><p class="refpurpose"><span class="refname">cal_info</span> &mdash; <span class="dc-title">Returns information about a particular calendar</span></p> </div> <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type">array</span> <span class="methodname"><b><b>cal_info</b></b></span>    ([ <span class="methodparam"><span class="type">int</span> <tt class="parameter">$calendar</tt></span>  ] )</div>  <p class="para rdfs-comment">   <b>cal_info()</b> returns information on the   specified <i><tt class="parameter">calendar</tt></i>.  </p>  <p class="para">   Calendar information is returned as an array containing the   elements <i>calname</i>, <i>calsymbol</i>,   <i>month</i>, <i>abbrevmonth</i> and   <i>maxdaysinmonth</i>. The names of the different calendars    which can be used as <i><tt class="parameter">calendar</tt></i> are as follows:   <ul class="itemizedlist">    <li class="listitem">     <span class="simpara">      0 or <b><tt>CAL_GREGORIAN</tt></b> - Gregorian Calendar     </span>    </li>    <li class="listitem">     <span class="simpara">      1 or <b><tt>CAL_JULIAN</tt></b> - Julian Calendar     </span>    </li>    <li class="listitem">     <span class="simpara">      2 or <b><tt>CAL_JEWISH</tt></b> - Jewish Calendar     </span>    </li>    <li class="listitem">     <span class="simpara">      3 or <b><tt>CAL_FRENCH</tt></b> - French Revolutionary Calendar     </span>    </li>   </ul>  </p>  <p class="para">   If no <i><tt class="parameter">calendar</tt></i> is specified information on all   supported calendars is returned as an array.   </p> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">calendar</tt></i></span>     <dd>      <p class="para">       Calendar to return information for. If no calendar is specified       information about all calendars is returned.      </p>     </dd>    </dt>   </dl>  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">  </p> </div> <div class="refsect1 changelog">  <h3 class="title">ChangeLog</h3>  <p class="para">   <table class="informaltable">    <colgroup>     <thead valign="middle">      <tr valign="middle">       <th colspan="1">Version</th>       <th colspan="1">Description</th>      </tr>     </thead>     <tbody valign="middle" class="tbody">      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">Since 5.0</td>       <td colspan="1" rowspan="1" align="left">        The <i><tt class="parameter">calendar</tt></i> parameter becomes optional        and defaults to &quot;all calendars&quot; if omitted.       </td>      </tr>     </tbody>    </colgroup>   </table>  </p> </div> <div class="refsect1 examples">  <h3 class="title">Examples</h3>  <p class="para">   <div class="example">    <p><b>Example #1 <b>cal_info()</b> example</b></p>    <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$info&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">cal_info</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$info</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>    </div>    <div class="example-contents"><p>The above example will output:</p></div>    <div class="example-contents"><pre><div class="cdata"><pre>Array(    [months] =&gt; Array        (            [1] =&gt; January            [2] =&gt; February            [3] =&gt; March            [4] =&gt; April            [5] =&gt; May            [6] =&gt; June            [7] =&gt; July            [8] =&gt; August            [9] =&gt; September            [10] =&gt; October            [11] =&gt; November            [12] =&gt; December        )    [abbrevmonths] =&gt; Array        (            [1] =&gt; Jan            [2] =&gt; Feb            [3] =&gt; Mar            [4] =&gt; Apr            [5] =&gt; May            [6] =&gt; Jun            [7] =&gt; Jul            [8] =&gt; Aug            [9] =&gt; Sep            [10] =&gt; Oct            [11] =&gt; Nov            [12] =&gt; Dec        )    [maxdaysinmonth] =&gt; 31    [calname] =&gt; Gregorian    [calsymbol] =&gt; CAL_GREGORIAN)</pre></div>    </pre></div>   </div>  </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.cal-from-jd.html">cal_from_jd</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.cal-to-jd.html">cal_to_jd</a></div> <div class="up"><a href="ref.calendar.html">Calendar Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -