mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 13:57:03 +08:00
102 lines
3.5 KiB
HTML
102 lines
3.5 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-days-in-month" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">cal_days_in_month</h1>
|
|
<p class="verinfo">(PHP 4 >= 4.1.0, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">cal_days_in_month</span> — <span class="dc-title">返回某个历法中某年中某月的天数</span></p>
|
|
|
|
</div>
|
|
|
|
<div class="refsect1 description" id="refsect1-function.cal-days-in-month-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>cal_days_in_month</strong></span>
|
|
( <span class="methodparam"><span class="type">int</span> <code class="parameter">$calendar</code></span>
|
|
, <span class="methodparam"><span class="type">int</span> <code class="parameter">$month</code></span>
|
|
, <span class="methodparam"><span class="type">int</span> <code class="parameter">$year</code></span>
|
|
) : <span class="type">int</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
该函数返回特定<code class="parameter">历法</code>中的某<code class="parameter">年</code>中的某<code class="parameter">月</code>的天数。
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.cal-days-in-month-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">calendar</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
用来计算的某个历法
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">month</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
选定历法中的某月
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">year</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
选定历法中的某年
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.cal-days-in-month-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
指定历法中选定的某月的天数。
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 examples" id="refsect1-function.cal-days-in-month-examples">
|
|
<h3 class="title">范例</h3>
|
|
<p class="para">
|
|
<div class="example" id="example-2642">
|
|
<p><strong>Example #1 <span class="function"><strong>cal_days_in_month()</strong></span> example</strong></p>
|
|
<div class="example-contents">
|
|
<div class="phpcode"><pre><span style="color: #000000">
|
|
<span style="color: #0000BB"><?php<br />$num </span><span style="color: #007700">= </span><span style="color: #0000BB">cal_days_in_month</span><span style="color: #007700">(</span><span style="color: #0000BB">CAL_GREGORIAN</span><span style="color: #007700">, </span><span style="color: #0000BB">8</span><span style="color: #007700">, </span><span style="color: #0000BB">2003</span><span style="color: #007700">); </span><span style="color: #FF8000">// 31<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"There was </span><span style="color: #0000BB">$num</span><span style="color: #DD0000"> days in August 2003"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?></span>
|
|
</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</div>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
</div></div></div></body></html> |