- <i>//correct way:</i>
- <b>var</b> orig = <b>new</b> Date(<em>'10/1/2006'</em>);
- <b>var</b> copy = orig.clone();
- copy.setDate(5);
- document.write(orig); //returns <em>'Thu Oct 01 2006'</em></code></pre> <div class="mdetail-params">\r
- <strong>Parameters:</strong>\r
- <ul><li>None.</li> </ul>\r
- <strong>Returns:</strong>\r
- <ul>\r
- <li><code>Date</code><div class="sub-desc">The new Date instance.</div></li>\r
- </ul>\r
- </div>\r
- </div>\r
- </div>\r
- </td>\r
- <td class="msource">Date</td>\r
- </tr>\r
- <tr class="method-row expandable">\r
- <td class="micon"><a class="exi" href="#expand"> </a></td>\r
- <td class="sig">\r
- <a id="Date-format"></a>\r
- <b>format</b>( <code>String format</code> ) : String <div class="mdesc">\r
- <div class="short">Formats a date given the supplied format string.</div>\r
- <div class="long">\r
- Formats a date given the supplied format string. <div class="mdetail-params">\r
- <strong>Parameters:</strong>\r
- <ul><li><code>format</code> : String<div class="sub-desc">The format string.</div></li> </ul>\r
- <strong>Returns:</strong>\r
- <ul>\r
- <li><code>String</code><div class="sub-desc">The formatted date.</div></li>\r
- </ul>\r
- </div>\r
- </div>\r
- </div>\r
- </td>\r
- <td class="msource">Date</td>\r
- </tr>\r
- <tr class="method-row alt expandable">\r
- <td class="micon"><a class="exi" href="#expand"> </a></td>\r
- <td class="sig">\r
- <a id="Date-getDayOfYear"></a>\r
- <b>getDayOfYear</b>() : Number <div class="mdesc">\r
- <div class="short">Get the numeric day number of the year, adjusted for leap year.</div>\r
- <div class="long">\r
- Get the numeric day number of the year, adjusted for leap year. <div class="mdetail-params">\r
- <strong>Parameters:</strong>\r
- <ul><li>None.</li> </ul>\r
- <strong>Returns:</strong>\r
- <ul>\r
- <li><code>Number</code><div class="sub-desc">0 to 364 (365 in leap years).</div></li>\r
- </ul>\r
- </div>\r
- </div>\r
- </div>\r
- </td>\r
- <td class="msource">Date</td>\r
- </tr>\r
- <tr class="method-row expandable">\r
- <td class="micon"><a class="exi" href="#expand"> </a></td>\r
- <td class="sig">\r
- <a id="Date-getDaysInMonth"></a>\r
- <b>getDaysInMonth</b>() : Number <div class="mdesc">\r
- <div class="short">Get the number of days in the current month, adjusted for leap year.</div>\r
- <div class="long">\r
- Get the number of days in the current month, adjusted for leap year. <div class="mdetail-params">\r
- <strong>Parameters:</strong>\r
- <ul><li>None.</li> </ul>\r
- <strong>Returns:</strong>\r
- <ul>\r
- <li><code>Number</code><div class="sub-desc">The number of days in the month.</div></li>\r
- </ul>\r
- </div>\r
- </div>\r
- </div>\r
- </td>\r
- <td class="msource">Date</td>\r
- </tr>\r
- <tr class="method-row alt expandable">\r
- <td class="micon"><a class="exi" href="#expand"> </a></td>\r
- <td class="sig">\r
- <a id="Date-getElapsed"></a>\r
- <b>getElapsed</b>( <span class="optional" title="Optional">[<code>Date date</code>]</span> ) : Number <div class="mdesc">\r
- <div class="short">Returns the number of milliseconds between this date and date</div>\r
- <div class="long">\r
- Returns the number of milliseconds between this date and date <div class="mdetail-params">\r
- <strong>Parameters:</strong>\r
- <ul><li><code>date</code> : Date<div class="sub-desc">(optional) Defaults to now</div></li> </ul>\r
- <strong>Returns:</strong>\r
- <ul>\r
- <li><code>Number</code><div class="sub-desc">The diff in milliseconds</div></li>\r
- </ul>\r
- </div>\r
- </div>\r
- </div>\r
- </td>\r
- <td class="msource">Date</td>\r
- </tr>\r
- <tr class="method-row expandable">\r
- <td class="micon"><a class="exi" href="#expand"> </a></td>\r
- <td class="sig">\r
- <a id="Date-getFirstDateOfMonth"></a>\r
- <b>getFirstDateOfMonth</b>() : Date <div class="mdesc">\r
- <div class="short">Get the date of the first day of the month in which this date resides.</div>\r
- <div class="long">\r
- Get the date of the first day of the month in which this date resides. <div class="mdetail-params">\r
- <strong>Parameters:</strong>\r
- <ul><li>None.</li> </ul>\r
- <strong>Returns:</strong>\r
- <ul>\r
- <li><code>Date</code></li>\r
- </ul>\r
- </div>\r
- </div>\r
- </div>\r
- </td>\r
- <td class="msource">Date</td>\r
- </tr>\r
- <tr class="method-row alt expandable">\r
- <td class="micon"><a class="exi" href="#expand"> </a></td>\r
- <td class="sig">\r
- <a id="Date-getFirstDayOfMonth"></a>\r
- <b>getFirstDayOfMonth</b>() : Number <div class="mdesc">\r
- <div class="short">Get the first day of the current month, adjusted for leap year. The returned value
-is the numeric day index within t...</div>\r
- <div class="long">\r
- Get the first day of the current month, adjusted for leap year. The returned value
+<i>//correct way:</i>
+<b>var</b> orig = <b>new</b> Date(<em>'10/1/2006'</em>);
+<b>var</b> copy = orig.clone();
+copy.setDate(5);
+document.write(orig); <i>//returns <em>'Thu Oct 01 2006'</em></i></code></pre><div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Date</code><div class="sub-desc">The new Date instance.</div></li></ul></div></div></div></td><td class="msource">Date</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Date-format"></a><b><a href="source/Date.html#method-Date-format">format</a></b>( <code>String format</code> )
+ :
+ String<div class="mdesc"><div class="short">Formats a date given the supplied format string.</div><div class="long">Formats a date given the supplied format string.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>format</code> : String<div class="sub-desc">The format string.</div></li></ul><strong>Returns:</strong><ul><li><code>String</code><div class="sub-desc">The formatted date.</div></li></ul></div></div></div></td><td class="msource">Date</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Date-getDayOfYear"></a><b><a href="source/Date.html#method-Date-getDayOfYear">getDayOfYear</a></b>()
+ :
+ Number<div class="mdesc"><div class="short">Get the numeric day number of the year, adjusted for leap year.</div><div class="long">Get the numeric day number of the year, 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">0 to 364 (365 in leap years).</div></li></ul></div></div></div></td><td class="msource">Date</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Date-getDaysInMonth"></a><b><a href="source/Date.html#method-Date-getDaysInMonth">getDaysInMonth</a></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 expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Date-getElapsed"></a><b><a href="source/Ext-more.html#method-Date-getElapsed">getElapsed</a></b>( <span title="Optional" class="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 href="#expand" class="exi"> </a></td><td class="sig"><a id="Date-getFirstDateOfMonth"></a><b><a href="source/Date.html#method-Date-getFirstDateOfMonth">getFirstDateOfMonth</a></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><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">Date</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Date-getFirstDayOfMonth"></a><b><a href="source/Date.html#method-Date-getFirstDayOfMonth">getFirstDayOfMonth</a></b>()
+ :
+ Number<div class="mdesc"><div class="short">Get the first day of the current month, adjusted for leap year. The returned value
+is the numeric day index within t...</div><div class="long">Get the first day of the current month, adjusted for leap year. The returned value