mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 22:06:57 +08:00
174 lines
5.2 KiB
HTML
174 lines
5.2 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||
<title>返回选定历法的信息</title>
|
||
</head>
|
||
<body class="docs"><div id="layout">
|
||
<div id="layout-content"><div id="function.cal-info" class="refentry">
|
||
<div class="refnamediv">
|
||
<h1 class="refname">cal_info</h1>
|
||
<p class="verinfo">(PHP 4 >= 4.1.0, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">cal_info</span> — <span class="dc-title">返回选定历法的信息</span></p>
|
||
|
||
</div>
|
||
|
||
<div class="refsect1 description" id="refsect1-function.cal-info-description">
|
||
<h3 class="title">说明</h3>
|
||
<div class="methodsynopsis dc-description">
|
||
<span class="methodname"><strong>cal_info</strong></span>
|
||
([ <span class="methodparam"><span class="type">int</span> <code class="parameter">$calendar</code><span class="initializer"> = -1</span></span>
|
||
] ) : <span class="type">array</span></div>
|
||
|
||
<p class="para rdfs-comment">
|
||
<span class="function"><strong>cal_info()</strong></span>返回选定 <code class="parameter">calendar</code>的作息。
|
||
</p>
|
||
<p class="para">
|
||
历法信息以一个数组的形式返回,包含的元素有<em>历法名称</em>,<em>历法代码</em>,<em>月份</em>,<em>月份的缩写</em>和<em>单月的最多天数</em>。作为参数的<code class="parameter">calendar</code>历法名字可以有:
|
||
<ul class="itemizedlist">
|
||
<li class="listitem">
|
||
<span class="simpara">
|
||
0 or <strong><code>CAL_GREGORIAN</code></strong> - Gregorian Calendar
|
||
</span>
|
||
</li>
|
||
<li class="listitem">
|
||
<span class="simpara">
|
||
1 or <strong><code>CAL_JULIAN</code></strong> - Julian Calendar
|
||
</span>
|
||
</li>
|
||
<li class="listitem">
|
||
<span class="simpara">
|
||
2 or <strong><code>CAL_JEWISH</code></strong> - Jewish Calendar
|
||
</span>
|
||
</li>
|
||
<li class="listitem">
|
||
<span class="simpara">
|
||
3 or <strong><code>CAL_FRENCH</code></strong> - French Revolutionary Calendar
|
||
</span>
|
||
</li>
|
||
</ul>
|
||
</p>
|
||
<p class="para">
|
||
如果没有指定参数<code class="parameter">calendar</code>,所支持的所有历法将以数组形式返回。
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 parameters" id="refsect1-function.cal-info-parameters">
|
||
<h3 class="title">参数</h3>
|
||
<p class="para">
|
||
<dl>
|
||
|
||
|
||
<dt>
|
||
<code class="parameter">calendar</code></dt>
|
||
|
||
<dd>
|
||
|
||
<p class="para">
|
||
返回信息所指定的历法名称,如果没有指定历法,将返回所有历法。
|
||
</p>
|
||
</dd>
|
||
|
||
|
||
</dl>
|
||
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 returnvalues" id="refsect1-function.cal-info-returnvalues">
|
||
<h3 class="title">返回值</h3>
|
||
<p class="para">
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 changelog" id="refsect1-function.cal-info-changelog">
|
||
<h3 class="title">更新日志</h3>
|
||
<p class="para">
|
||
<table class="doctable informaltable">
|
||
|
||
<thead>
|
||
<tr>
|
||
<th>版本</th>
|
||
<th>说明</th>
|
||
</tr>
|
||
|
||
</thead>
|
||
|
||
<tbody class="tbody">
|
||
<tr>
|
||
<td>Since 5.0</td>
|
||
<td>
|
||
参数<code class="parameter">calendar</code>作为可选项,缺省时默认值为"所有历法"。
|
||
</td>
|
||
</tr>
|
||
|
||
</tbody>
|
||
|
||
</table>
|
||
|
||
</p>
|
||
</div>
|
||
|
||
|
||
<div class="refsect1 examples" id="refsect1-function.cal-info-examples">
|
||
<h3 class="title">范例</h3>
|
||
<p class="para">
|
||
<div class="example" id="example-2644">
|
||
<p><strong>Example #1 <span class="function"><strong>cal_info()</strong></span> example</strong></p>
|
||
<div class="example-contents">
|
||
<div class="phpcode"><pre><span style="color: #000000">
|
||
<span style="color: #0000BB"><?php<br />$info </span><span style="color: #007700">= </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">?></span>
|
||
</span>
|
||
</pre></div>
|
||
</div>
|
||
|
||
<div class="example-contents"><p>以上例程会输出:</p></div>
|
||
<div class="example-contents screen">
|
||
<div class="cdata"><pre>
|
||
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
|
||
)
|
||
</pre></div>
|
||
</div>
|
||
</div>
|
||
</p>
|
||
</div>
|
||
|
||
</div></div></div></body></html> |