date.html.svn-base
来自「PHP 知识管理系统(基于树结构的知识管理系统), 英文原版的PHP源码。」· SVN-BASE 代码 · 共 747 行 · 第 1/3 页
SVN-BASE
747 行
</td>
<td class="msource">Date</td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Date-getDaysInMonth"></a>
<b>getDaysInMonth</b>() : Number <div class="mdesc">
<div class="short">Get the number of days in the current month, adjusted for leap year.</div>
<div class="long">
Get the number of days in the current month, adjusted for leap year. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Number</code><div class="sub-desc">The number of days in the month.</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Date</td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Date-getElapsed"></a>
<b>getElapsed</b>( <span class="optional" title="Optional">[<code>Date date</code>]</span> ) : Number <div class="mdesc">
<div class="short">Returns the number of milliseconds between this date and date</div>
<div class="long">
Returns the number of milliseconds between this date and date <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>date</code> : Date<div class="sub-desc">(optional) Defaults to now</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Number</code><div class="sub-desc">The diff in milliseconds</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Date</td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Date-getFirstDateOfMonth"></a>
<b>getFirstDateOfMonth</b>() : Date <div class="mdesc">
<div class="short">Get the date of the first day of the month in which this date resides.</div>
<div class="long">
Get the date of the first day of the month in which this date resides. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Date</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Date</td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Date-getFirstDayOfMonth"></a>
<b>getFirstDayOfMonth</b>() : Number <div class="mdesc">
<div class="short">Get the first day of the current month, adjusted for leap year. The returned valueis the numeric day index within t...</div>
<div class="long">
Get the first day of the current month, adjusted for leap year. The returned valueis the numeric day index within the week (0-6) which can be used in conjunction withthe <a ext:cls="Date" ext:member="monthNames" href="output/Date.html#monthNames">monthNames</a> array to retrieve the textual day name.Example:<pre><code>var dt = <b>new</b> Date(<em>'1/10/2007'</em>);document.write(Date.dayNames[dt.getFirstDayOfMonth()]); //output: <em>'Monday'</em></code></pre> <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Number</code><div class="sub-desc">The day number (0-6).</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Date</td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Date-getGMTOffset"></a>
<b>getGMTOffset</b>( <code>Boolean colon</code> ) : String <div class="mdesc">
<div class="short">Get the offset from GMT of the current date (equivalent to the format specifier 'O').</div>
<div class="long">
Get the offset from GMT of the current date (equivalent to the format specifier 'O'). <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li><code>colon</code> : Boolean<div class="sub-desc">true to separate the hours and minutes with a colon (defaults to false).</div></li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>String</code><div class="sub-desc">The 4-character offset string prefixed with + or - (e.g. '-0600').</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Date</td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Date-getLastDateOfMonth"></a>
<b>getLastDateOfMonth</b>() : Date <div class="mdesc">
<div class="short">Get the date of the last day of the month in which this date resides.</div>
<div class="long">
Get the date of the last day of the month in which this date resides. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Date</code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Date</td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Date-getLastDayOfMonth"></a>
<b>getLastDayOfMonth</b>() : Number <div class="mdesc">
<div class="short">Get the last day of the current month, adjusted for leap year. The returned valueis the numeric day index within th...</div>
<div class="long">
Get the last day of the current month, adjusted for leap year. The returned valueis the numeric day index within the week (0-6) which can be used in conjunction withthe <a ext:cls="Date" ext:member="monthNames" href="output/Date.html#monthNames">monthNames</a> array to retrieve the textual day name.Example:<pre><code>var dt = <b>new</b> Date(<em>'1/10/2007'</em>);document.write(Date.dayNames[dt.getLastDayOfMonth()]); //output: <em>'Wednesday'</em></code></pre> <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Number</code><div class="sub-desc">The day number (0-6).</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Date</td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Date-getSuffix"></a>
<b>getSuffix</b>() : String <div class="mdesc">
<div class="short">Get the English ordinal suffix of the current day (equivalent to the format specifier 'S').</div>
<div class="long">
Get the English ordinal suffix of the current day (equivalent to the format specifier 'S'). <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>String</code><div class="sub-desc">'st, 'nd', 'rd' or 'th'.</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Date</td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Date-getTimezone"></a>
<b>getTimezone</b>() : String <div class="mdesc">
<div class="short">Get the timezone abbreviation of the current date (equivalent to the format specifier 'T').Note: The date string ret...</div>
<div class="long">
Get the timezone abbreviation of the current date (equivalent to the format specifier 'T').Note: The date string returned by the javascript Date object's toString() method variesbetween browsers (e.g. FF vs IE) and system region settings (e.g. IE in Asia vs IE in America).For a given date string e.g. "Thu Oct 25 2007 22:55:35 GMT+0800 (Malay Peninsula Standard Time)",getTimezone() first tries to get the timezone abbreviation from between a pair of parentheses(which may or may not be present), failing which it proceeds to get the timezone abbreviationfrom the GMT offset portion of the date string. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>String</code><div class="sub-desc">The abbreviated timezone name (e.g. 'CST', 'PDT', 'EDT', 'MPST' ...).</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Date</td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Date-getWeekOfYear"></a>
<b>getWeekOfYear</b>() : Number <div class="mdesc">
<div class="short">Get the numeric ISO-8601 week number of the year.(equivalent to the format specifier 'W', but without a leading zero).</div>
<div class="long">
Get the numeric ISO-8601 week number of the year.(equivalent to the format specifier 'W', but without a leading zero). <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Number</code><div class="sub-desc">1 to 53</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Date</td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Date-isLeapYear"></a>
<b>isLeapYear</b>() : Boolean <div class="mdesc">
<div class="short">Whether or not the current date is in a leap year.</div>
<div class="long">
Whether or not the current date is in a leap year. <div class="mdetail-params">
<strong>Parameters:</strong>
<ul><li>None.</li> </ul>
<strong>Returns:</strong>
<ul>
<li><code>Boolean</code><div class="sub-desc">True if the current date is in a leap year, else false.</div></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">Date</td>
</tr>
</table> <a id="Date-events"></a> <h2>Public Events</h2> <div class="no-members">This class has no public events.</div> </div>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?