1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <meta http-equiv="content-type" content="text/html; charset=undefined" />
8 <meta name="generator" content="JsDoc Toolkit" />
11 <title>JsDoc Reference - Date</title>
14 <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />
15 <link rel="stylesheet" type="text/css" href="../default.css" />
18 <script type="text/javascript" src="../page.js">
25 <body onload="RooDocsPage.onload();">
28 <div class="body-wrap">
30 <!-- ============================== links to methods. ================================= -->
32 <div class="top-tools">
34 <a class="inner-link" href="#Date-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35 <a class="inner-link" href="#Date-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36 <a class="inner-link" href="#Date-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37 <a class="inner-link" href="#Date-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
38 <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
43 <!-- ============================== inheritance Block. ================================= -->
45 <!-- ============================== class title / details ============================ -->
48 <h1 class="classTitle">
53 <table cellspacing="0" class="class-summary-table">
55 <tr><td class="label">Defined In:</td><td class="hd-info">
57 <a href="./src/Date.js.html">Date.js</a>.
60 <tr><td class="label">Class:</td><td class="hd-info">Date</td></tr>
68 <!-- ============================== class summary ========================== -->
69 <div class="description">
70 The date parsing and format syntax is a subset of<br/><a href="http://www.php.net/date">PHP's date() function</a>, and the formats that are<br/>supported will provide results equivalent to their PHP versions.<br/><br/>Following is the list of all currently supported formats:<br/><pre><br/>Sample date:<br/>'Wed Jan 10 2007 15:05:01 GMT-0600 (Central Standard Time)'<br/><br/>Format Output Description<br/>------ ---------- --------------------------------------------------------------<br/> d 10 Day of the month, 2 digits with leading zeros<br/> D Wed A textual representation of a day, three letters<br/> j 10 Day of the month without leading zeros<br/> l Wednesday A full textual representation of the day of the week<br/> S th English ordinal day of month suffix, 2 chars (use with j)<br/> w 3 Numeric representation of the day of the week<br/> z 9 The julian date, or day of the year (0-365)<br/> W 01 ISO-8601 2-digit week number of year, weeks starting on Monday (00-52)<br/> F January A full textual representation of the month<br/> m 01 Numeric representation of a month, with leading zeros<br/> M Jan Month name abbreviation, three letters<br/> n 1 Numeric representation of a month, without leading zeros<br/> t 31 Number of days in the given month<br/> L 0 Whether it's a leap year (1 if it is a leap year, else 0)<br/> Y 2007 A full numeric representation of a year, 4 digits<br/> y 07 A two digit representation of a year<br/> a pm Lowercase Ante meridiem and Post meridiem<br/> A PM Uppercase Ante meridiem and Post meridiem<br/> g 3 12-hour format of an hour without leading zeros<br/> G 15 24-hour format of an hour without leading zeros<br/> h 03 12-hour format of an hour with leading zeros<br/> H 15 24-hour format of an hour with leading zeros<br/> i 05 Minutes with leading zeros<br/> s 01 Seconds, with leading zeros<br/> O -0600 Difference to Greenwich time (GMT) in hours (Allows +08, without minutes)<br/> P -06:00 Difference to Greenwich time (GMT) with colon between hours and minutes<br/> T CST Timezone setting of the machine running the code<br/> Z -21600 Timezone offset in seconds (negative if west of UTC, positive if east)<br/></pre><br/><br/>Example usage (note that you must escape format specifiers with '\\' to render them as character literals):<br/><pre><code><br/>var dt = new Date('1/10/2007 03:05:01 PM GMT-0600');<br/>document.write(dt.format('Y-m-d')); //2007-01-10<br/>document.write(dt.format('F j, Y, g:i a')); //January 10, 2007, 3:05 pm<br/>document.write(dt.format('l, \\t\\he dS of F Y h:i:s A')); //Wednesday, the 10th of January 2007 03:05:01 PM<br/> </code></pre><br/><br/>Here are some standard date/time patterns that you might find helpful. They<br/>are not part of the source of Date.js, but to use them you can simply copy this<br/>block of code into any script that is included after Date.js and they will also become<br/>globally available on the Date object. Feel free to add or remove patterns as needed in your code.<br/><pre><code><br/>Date.patterns = {<br/> ISO8601Long:"Y-m-d H:i:s",<br/> ISO8601Short:"Y-m-d",<br/> ShortDate: "n/j/Y",<br/> LongDate: "l, F d, Y",<br/> FullDateTime: "l, F d, Y g:i:s A",<br/> MonthDay: "F d",<br/> ShortTime: "g:i A",<br/> LongTime: "g:i:s A",<br/> SortableDateTime: "Y-m-d\\TH:i:s",<br/> UniversalSortableDateTime: "Y-m-d H:i:sO",<br/> YearMonth: "F, Y"<br/>};<br/></code></pre><br/><br/>Example usage:<br/><pre><code><br/>var dt = new Date();<br/>document.write(dt.format(Date.patterns.ShortDate));<br/> </code></pre>
74 <!-- ============================== Class comment block... ========================== -->
76 <div class="comments">
77 <b>Class Comments / Notes</B> =>
78 <u onclick="parent.CommentDialog.showCommentId = 'Date';">[Add Your comment/notes about this class]</u>
80 <iframe frameborder="0" id="comments-" style="border: none;width:100%;"
81 src="/blog.php/GtkDjsComments/Date.html"></iframe>
86 <!-- ============================== config options ========================== -->
91 <div class="hr"></div>
92 <a id="Date-configs"></a>
96 <table cellspacing="0" class="member-table">
97 <caption class="Empty">Config Options - Has None</caption>
111 <!-- ============================== public properties ==================== -->
115 <a id="Date-props"></a>
123 <table cellspacing="0" class="member-table">
124 <caption>Public Properties </caption>
126 <th class="sig-header" colspan="2">Property</th>
127 <th class="sig-header">Description</th>
128 <th class="msource-header">Defined By</th>
138 <tr class="property-row config-row-alt0 notInherited">
140 <a class="exi" href="#expand"> </a>
143 <a id="Date-prop-DAY" name=".DAY"></a>
144 <div class="fixedFont">
145 <span class="attributes">Date.</span><b class="itemname">DAY</b> :
146 <span type="etype"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>
154 Date interval constant
162 Date interval constant
177 <tr class="property-row config-row-alt1 notInherited">
179 <a class="exi" href="#expand"> </a>
182 <a id="Date-prop-HOUR" name=".HOUR"></a>
183 <div class="fixedFont">
184 <span class="attributes">Date.</span><b class="itemname">HOUR</b> :
185 <span type="etype"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>
193 Date interval constant
201 Date interval constant
216 <tr class="property-row config-row-alt0 notInherited">
218 <a class="exi" href="#expand"> </a>
221 <a id="Date-prop-MILLI" name=".MILLI"></a>
222 <div class="fixedFont">
223 <span class="attributes">Date.</span><b class="itemname">MILLI</b> :
224 <span type="etype"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>
232 Date interval constant
240 Date interval constant
255 <tr class="property-row config-row-alt1 notInherited">
257 <a class="exi" href="#expand"> </a>
260 <a id="Date-prop-MINUTE" name=".MINUTE"></a>
261 <div class="fixedFont">
262 <span class="attributes">Date.</span><b class="itemname">MINUTE</b> :
263 <span type="etype"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>
271 Date interval constant
279 Date interval constant
294 <tr class="property-row config-row-alt0 notInherited">
296 <a class="exi" href="#expand"> </a>
299 <a id="Date-prop-MONTH" name=".MONTH"></a>
300 <div class="fixedFont">
301 <span class="attributes">Date.</span><b class="itemname">MONTH</b> :
302 <span type="etype"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>
310 Date interval constant
318 Date interval constant
333 <tr class="property-row config-row-alt1 notInherited">
335 <a class="exi" href="#expand"> </a>
338 <a id="Date-prop-SECOND" name=".SECOND"></a>
339 <div class="fixedFont">
340 <span class="attributes">Date.</span><b class="itemname">SECOND</b> :
341 <span type="etype"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>
349 Date interval constant
357 Date interval constant
372 <tr class="property-row config-row-alt0 notInherited">
374 <a class="exi" href="#expand"> </a>
377 <a id="Date-prop-YEAR" name=".YEAR"></a>
378 <div class="fixedFont">
379 <span class="attributes">Date.</span><b class="itemname">YEAR</b> :
380 <span type="etype"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>
388 Date interval constant
396 Date interval constant
411 <tr class="property-row config-row-alt1 notInherited">
413 <a class="exi" href="#expand"> </a>
416 <a id="Date-prop-dayNames" name=".dayNames"></a>
417 <div class="fixedFont">
418 <span class="attributes">Date.</span><b class="itemname">dayNames</b> :
419 <span type="etype"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span>
427 An array of textual day names.
435 An array of textual day names.<br/>Override these values for international dates, for example...<br/>Date.dayNames = ['SundayInYourLang', 'MondayInYourLang', ...];
450 <tr class="property-row config-row-alt0 notInherited">
452 <a class="exi" href="#expand"> </a>
455 <a id="Date-prop-monthNames" name=".monthNames"></a>
456 <div class="fixedFont">
457 <span class="attributes">Date.</span><b class="itemname">monthNames</b> :
458 <span type="etype"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span>
466 An array of textual month names.
474 An array of textual month names.<br/>Override these values for international dates, for example...<br/>Date.monthNames = ['JanInYourLang', 'FebInYourLang', ...];
490 <!-- TODO: implement this alt row. also notice non-linked "Defined by" when property is a part of this class.
491 <tr class="property-row alt">
498 <!-- ============================== methods summary / details ======================== -->
501 <a id="Date-methods"></a>
502 <!-- constructor?? -->
509 <!-- then dynamics first -->
516 <table cellspacing="0" class="member-table">
517 <caption>Public Methods</caption>
519 <th class="sig-header" colspan="2">Method</th>
520 <th class="msource-header">Defined By</th>
530 <tr class="method-row config-row-alt0 expandable notInherited">
531 <td class="micon"><a class="exi" href="#expand"> </a></td>
535 <a id="Date-method-parseDate" name=".parseDate"></a>
536 <div class="fixedFont">
537 <span class="attributes">Date.</span><b class="itemname">parseDate</b>
539 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>input</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>format</i></B>)
545 <a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a>
554 <div class="short">Parses the passed string using the specified format.</div>
560 Parses the passed string using the specified format. Note that this function expects dates in normal calendar<br/>format, meaning that months are 1-based (1 = January) and not zero-based like in JavaScript dates. Any part of<br/>the date format that is not specified will default to the current date value for that part. Time parts can also<br/>be specified, but default to 0. Keep in mind that the input date string must precisely match the specified format<br/>string or the parse operation will fail.<br/>Example Usage:<br/><pre><code><br/>//dt = Fri May 25 2007 (current date)<br/>var dt = new Date();<br/><br/>//dt = Thu May 25 2006 (today's month/day in 2006)<br/>dt = Date.parseDate("2006", "Y");<br/><br/>//dt = Sun Jan 15 2006 (all date parts specified)<br/>dt = Date.parseDate("2006-1-15", "Y-m-d");<br/><br/>//dt = Sun Jan 15 2006 15:20:01 GMT-0600 (CST)<br/>dt = Date.parseDate("2006-1-15 3:20:01 PM", "Y-m-d h:i:s A" );<br/></code></pre>
567 <dl class="detailList">
568 <dt class="heading">Parameters:</dt>
571 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>input</b>
574 <dd>The unparsed date as a string</dd>
577 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>format</b>
580 <dd>The format the date is in</dd>
588 <dl class="detailList">
589 <dt class="heading">Returns:</dt>
591 <dd><span class="fixedFont"><a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a></span> The parsed date</dd>
613 <tr class="method-row config-row-alt1 expandable notInherited">
614 <td class="micon"><a class="exi" href="#expand"> </a></td>
618 <a id="Date-method-add" name=".add"></a>
619 <div class="fixedFont">
620 <span class="attributes"></span><b class="itemname">add</b>
622 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>interval</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>value</i></B>)
628 <a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a>
637 <div class="short">Provides a convenient method of performing basic date arithmetic.</div>
643 Provides a convenient method of performing basic date arithmetic. This method<br/>does not modify the Date instance being called - it creates and returns<br/>a new Date instance containing the resulting date value.<br/><br/>Examples:<br/><pre><code><br/>//Basic usage:<br/>var dt = new Date('10/29/2006').add(Date.DAY, 5);<br/>document.write(dt); //returns 'Fri Oct 06 2006 00:00:00'<br/><br/>//Negative values will subtract correctly:<br/>var dt2 = new Date('10/1/2006').add(Date.DAY, -5);<br/>document.write(dt2); //returns 'Tue Sep 26 2006 00:00:00'<br/><br/>//You can even chain several calls together in one line!<br/>var dt3 = new Date('10/1/2006').add(Date.DAY, 5).add(Date.HOUR, 8).add(Date.MINUTE, -30);<br/>document.write(dt3); //returns 'Fri Oct 06 2006 07:30:00'<br/> </code></pre>
650 <dl class="detailList">
651 <dt class="heading">Parameters:</dt>
654 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>interval</b>
657 <dd>A valid date interval enum value</dd>
660 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>value</b>
663 <dd>The amount to add to the current date</dd>
671 <dl class="detailList">
672 <dt class="heading">Returns:</dt>
674 <dd><span class="fixedFont"><a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a></span> The new Date instance</dd>
696 <tr class="method-row config-row-alt0 expandable notInherited">
697 <td class="micon"><a class="exi" href="#expand"> </a></td>
701 <a id="Date-method-clearTime" name=".clearTime"></a>
702 <div class="fixedFont">
703 <span class="attributes"></span><b class="itemname">clearTime</b>
705 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>clone</i></B>)
711 <a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a>
720 <div class="short">Clears any time information from this date</div>
726 Clears any time information from this date
733 <dl class="detailList">
734 <dt class="heading">Parameters:</dt>
737 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>clone</b>
740 <dd>true to create a clone of this date, clear the time and return it</dd>
748 <dl class="detailList">
749 <dt class="heading">Returns:</dt>
751 <dd><span class="fixedFont"><a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a></span> this or the clone</dd>
773 <tr class="method-row config-row-alt1 expandable notInherited">
774 <td class="micon"><a class="exi" href="#expand"> </a></td>
778 <a id="Date-method-clone" name=".clone"></a>
779 <div class="fixedFont">
780 <span class="attributes"></span><b class="itemname">clone</b>
788 <a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a>
797 <div class="short">Creates and returns a new Date instance with the exact same date value as the called instance.</div>
803 Creates and returns a new Date instance with the exact same date value as the called instance.<br/>Dates are copied and passed by reference, so if a copied date variable is modified later, the original<br/>variable will also be changed. When the intention is to create a new variable that will not<br/>modify the original instance, you should create a clone.<br/><br/>Example of correctly cloning a date:<br/><pre><code><br/>//wrong way:<br/>var orig = new Date('10/1/2006');<br/>var copy = orig;<br/>copy.setDate(5);<br/>document.write(orig); //returns 'Thu Oct 05 2006'!<br/><br/>//correct way:<br/>var orig = new Date('10/1/2006');<br/>var copy = orig.clone();<br/>copy.setDate(5);<br/>document.write(orig); //returns 'Thu Oct 01 2006'<br/></code></pre>
814 <dl class="detailList">
815 <dt class="heading">Returns:</dt>
817 <dd><span class="fixedFont"><a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a></span> The new Date instance</dd>
839 <tr class="method-row config-row-alt0 expandable notInherited">
840 <td class="micon"><a class="exi" href="#expand"> </a></td>
844 <a id="Date-method-format" name=".format"></a>
845 <div class="fixedFont">
846 <span class="attributes"></span><b class="itemname">format</b>
848 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>format</i></B>)
854 <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
863 <div class="short">Formats a date given the supplied format string</div>
869 Formats a date given the supplied format string
876 <dl class="detailList">
877 <dt class="heading">Parameters:</dt>
880 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>format</b>
883 <dd>The format string</dd>
891 <dl class="detailList">
892 <dt class="heading">Returns:</dt>
894 <dd><span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> The formatted date</dd>
916 <tr class="method-row config-row-alt1 expandable notInherited">
917 <td class="micon"><a class="exi" href="#expand"> </a></td>
921 <a id="Date-method-getDayOfYear" name=".getDayOfYear"></a>
922 <div class="fixedFont">
923 <span class="attributes"></span><b class="itemname">getDayOfYear</b>
931 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
940 <div class="short">Get the numeric day number of the year, adjusted for leap year.</div>
946 Get the numeric day number of the year, adjusted for leap year.
957 <dl class="detailList">
958 <dt class="heading">Returns:</dt>
960 <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> 0 through 364 (365 in leap years)</dd>
982 <tr class="method-row config-row-alt0 expandable notInherited">
983 <td class="micon"><a class="exi" href="#expand"> </a></td>
987 <a id="Date-method-getDaysInMonth" name=".getDaysInMonth"></a>
988 <div class="fixedFont">
989 <span class="attributes"></span><b class="itemname">getDaysInMonth</b>
997 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
1006 <div class="short">Get the number of days in the current month, adjusted for leap year.</div>
1012 Get the number of days in the current month, adjusted for leap year.
1023 <dl class="detailList">
1024 <dt class="heading">Returns:</dt>
1026 <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> The number of days in the month</dd>
1040 <td class="msource">
1048 <tr class="method-row config-row-alt1 expandable notInherited">
1049 <td class="micon"><a class="exi" href="#expand"> </a></td>
1053 <a id="Date-method-getElapsed" name=".getElapsed"></a>
1054 <div class="fixedFont">
1055 <span class="attributes"></span><b class="itemname">getElapsed</b>
1057 (<a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a> <B><i>date</i></B>)
1063 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
1072 <div class="short">Returns the number of milliseconds between this date and date</div>
1078 Returns the number of milliseconds between this date and date
1085 <dl class="detailList">
1086 <dt class="heading">Parameters:</dt>
1089 <span class="fixedFont"><a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a></span> <b>date</b>
1092 <dd>(optional) Defaults to now</dd>
1100 <dl class="detailList">
1101 <dt class="heading">Returns:</dt>
1103 <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> The diff in milliseconds</dd>
1117 <td class="msource">
1125 <tr class="method-row config-row-alt0 expandable notInherited">
1126 <td class="micon"><a class="exi" href="#expand"> </a></td>
1130 <a id="Date-method-getFirstDateOfMonth" name=".getFirstDateOfMonth"></a>
1131 <div class="fixedFont">
1132 <span class="attributes"></span><b class="itemname">getFirstDateOfMonth</b>
1140 <a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a>
1149 <div class="short">Get the first date of this date's month</div>
1155 Get the first date of this date's month
1166 <dl class="detailList">
1167 <dt class="heading">Returns:</dt>
1169 <dd><span class="fixedFont"><a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a></span> </dd>
1183 <td class="msource">
1191 <tr class="method-row config-row-alt1 expandable notInherited">
1192 <td class="micon"><a class="exi" href="#expand"> </a></td>
1196 <a id="Date-method-getFirstDayOfMonth" name=".getFirstDayOfMonth"></a>
1197 <div class="fixedFont">
1198 <span class="attributes"></span><b class="itemname">getFirstDayOfMonth</b>
1206 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
1215 <div class="short">Get the first day of the current month, adjusted for leap year.</div>
1221 Get the first day of the current month, adjusted for leap year. The returned value<br/>is the numeric day index within the week (0-6) which can be used in conjunction with<br/>the {<b>link</b> <b>monthNames</b>} array to retrieve the textual day name.<br/>Example:<br/><pre><code><br/>var dt = new Date('1/10/2007');<br/>document.write(Date.dayNames[dt.getFirstDayOfMonth()]); //output: 'Monday'<br/></code></pre>
1232 <dl class="detailList">
1233 <dt class="heading">Returns:</dt>
1235 <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> The day number (0-6)</dd>
1249 <td class="msource">
1257 <tr class="method-row config-row-alt0 expandable notInherited">
1258 <td class="micon"><a class="exi" href="#expand"> </a></td>
1262 <a id="Date-method-getGMTColonOffset" name=".getGMTColonOffset"></a>
1263 <div class="fixedFont">
1264 <span class="attributes"></span><b class="itemname">getGMTColonOffset</b>
1272 <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
1281 <div class="short">Get the offset from GMT of the current date (equivalent to the format specifier 'P').</div>
1287 Get the offset from GMT of the current date (equivalent to the format specifier 'P').
1298 <dl class="detailList">
1299 <dt class="heading">Returns:</dt>
1301 <dd><span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> 2-characters representing hours and 2-characters representing minutes<br/>seperated by a colon and prefixed with + or - (e.g. '-06:00')</dd>
1315 <td class="msource">
1323 <tr class="method-row config-row-alt1 expandable notInherited">
1324 <td class="micon"><a class="exi" href="#expand"> </a></td>
1328 <a id="Date-method-getGMTOffset" name=".getGMTOffset"></a>
1329 <div class="fixedFont">
1330 <span class="attributes"></span><b class="itemname">getGMTOffset</b>
1338 <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
1347 <div class="short">Get the offset from GMT of the current date (equivalent to the format specifier 'O').</div>
1353 Get the offset from GMT of the current date (equivalent to the format specifier 'O').
1364 <dl class="detailList">
1365 <dt class="heading">Returns:</dt>
1367 <dd><span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> The 4-character offset string prefixed with + or - (e.g. '-0600')</dd>
1381 <td class="msource">
1389 <tr class="method-row config-row-alt0 expandable notInherited">
1390 <td class="micon"><a class="exi" href="#expand"> </a></td>
1394 <a id="Date-method-getLastDateOfMonth" name=".getLastDateOfMonth"></a>
1395 <div class="fixedFont">
1396 <span class="attributes"></span><b class="itemname">getLastDateOfMonth</b>
1404 <a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a>
1413 <div class="short">Get the last date of this date's month</div>
1419 Get the last date of this date's month
1430 <dl class="detailList">
1431 <dt class="heading">Returns:</dt>
1433 <dd><span class="fixedFont"><a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a></span> </dd>
1447 <td class="msource">
1455 <tr class="method-row config-row-alt1 expandable notInherited">
1456 <td class="micon"><a class="exi" href="#expand"> </a></td>
1460 <a id="Date-method-getLastDayOfMonth" name=".getLastDayOfMonth"></a>
1461 <div class="fixedFont">
1462 <span class="attributes"></span><b class="itemname">getLastDayOfMonth</b>
1470 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
1479 <div class="short">Get the last day of the current month, adjusted for leap year.</div>
1485 Get the last day of the current month, adjusted for leap year. The returned value<br/>is the numeric day index within the week (0-6) which can be used in conjunction with<br/>the {<b>link</b> <b>monthNames</b>} array to retrieve the textual day name.<br/>Example:<br/><pre><code><br/>var dt = new Date('1/10/2007');<br/>document.write(Date.dayNames[dt.getLastDayOfMonth()]); //output: 'Wednesday'<br/></code></pre>
1496 <dl class="detailList">
1497 <dt class="heading">Returns:</dt>
1499 <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> The day number (0-6)</dd>
1513 <td class="msource">
1521 <tr class="method-row config-row-alt0 expandable notInherited">
1522 <td class="micon"><a class="exi" href="#expand"> </a></td>
1526 <a id="Date-method-getSuffix" name=".getSuffix"></a>
1527 <div class="fixedFont">
1528 <span class="attributes"></span><b class="itemname">getSuffix</b>
1536 <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
1545 <div class="short">Get the English ordinal suffix of the current day (equivalent to the format specifier 'S').</div>
1551 Get the English ordinal suffix of the current day (equivalent to the format specifier 'S').
1562 <dl class="detailList">
1563 <dt class="heading">Returns:</dt>
1565 <dd><span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> 'st, 'nd', 'rd' or 'th'</dd>
1579 <td class="msource">
1587 <tr class="method-row config-row-alt1 expandable notInherited">
1588 <td class="micon"><a class="exi" href="#expand"> </a></td>
1592 <a id="Date-method-getTimezone" name=".getTimezone"></a>
1593 <div class="fixedFont">
1594 <span class="attributes"></span><b class="itemname">getTimezone</b>
1602 <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
1611 <div class="short">Get the timezone abbreviation of the current date (equivalent to the format specifier 'T').</div>
1617 Get the timezone abbreviation of the current date (equivalent to the format specifier 'T').
1628 <dl class="detailList">
1629 <dt class="heading">Returns:</dt>
1631 <dd><span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> The abbreviated timezone name (e.g. 'CST')</dd>
1645 <td class="msource">
1653 <tr class="method-row config-row-alt0 expandable notInherited">
1654 <td class="micon"><a class="exi" href="#expand"> </a></td>
1658 <a id="Date-method-getWeekOfYear" name=".getWeekOfYear"></a>
1659 <div class="fixedFont">
1660 <span class="attributes"></span><b class="itemname">getWeekOfYear</b>
1668 <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
1677 <div class="short">Get the string representation of the numeric week number of the year<br/>(equivalent to the format specifier 'W').</div>
1683 Get the string representation of the numeric week number of the year<br/>(equivalent to the format specifier 'W').
1694 <dl class="detailList">
1695 <dt class="heading">Returns:</dt>
1697 <dd><span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> '00' through '52'</dd>
1711 <td class="msource">
1719 <tr class="method-row config-row-alt1 expandable notInherited">
1720 <td class="micon"><a class="exi" href="#expand"> </a></td>
1724 <a id="Date-method-isLeapYear" name=".isLeapYear"></a>
1725 <div class="fixedFont">
1726 <span class="attributes"></span><b class="itemname">isLeapYear</b>
1734 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
1743 <div class="short">Whether or not the current date is in a leap year.</div>
1749 Whether or not the current date is in a leap year.
1760 <dl class="detailList">
1761 <dt class="heading">Returns:</dt>
1763 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> True if the current date is in a leap year, else false</dd>
1777 <td class="msource">
1788 <!-- ============================== events summary / details ======================== -->
1791 <a id="Date-events"></a>
1797 <table cellspacing="0" class="member-table">
1798 <caption class="Empty">Events - Has None</caption>
1809 <!-- ============================== footer ================================= -->
1810 <div class="fineprint" style="clear:both">
1812 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Mon Apr 25 2016 13:47:30 GMT+0800 (HKT)
1814 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>