--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=undefined" />
+ <meta name="generator" content="JsDoc Toolkit" />
+
+
+ <title>JsDoc Reference - Date</title>
+
+
+ <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />
+ <link rel="stylesheet" type="text/css" href="../default.css" />
+
+
+ <script type="text/javascript" src="../page.js">
+
+ </script>
+
+
+ </head>
+
+ <body onload="RooDocsPage.onload();">
+
+
+<div class="body-wrap">
+
+ <!-- ============================== links to methods. ================================= -->
+
+ <div class="top-tools">
+ <!--
+ <a class="inner-link" href="#Date-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
+ <a class="inner-link" href="#Date-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
+ <a class="inner-link" href="#Date-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
+ <a class="inner-link" href="#Date-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
+ <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
+ -->
+ </div>
+
+
+<!-- ============================== inheritance Block. ================================= -->
+
+<!-- ============================== class title / details ============================ -->
+
+
+ <h1 class="classTitle">
+
+ Built-In Class Date
+ </h1>
+
+ <table cellspacing="0" class="class-summary-table">
+
+ <tr><td class="label">Defined In:</td><td class="hd-info">
+
+ <a href="./src/Date.js.html">Date.js</a>.
+
+ </td></tr>
+ <tr><td class="label">Class:</td><td class="hd-info">Date</td></tr>
+
+
+
+
+ </table>
+
+
+<!-- ============================== class summary ========================== -->
+ <div class="description">
+ 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>
+ </div>
+
+
+<!-- ============================== Class comment block... ========================== -->
+
+<div class="comments">
+ <b>Class Comments / Notes</B> =>
+ <u onclick="parent.CommentDialog.showCommentId = 'Date';">[Add Your comment/notes about this class]</u>
+ <br/>
+ <iframe frameborder="0" id="comments-" style="border: none;width:100%;"
+ src="/blog.php/GtkDjsComments/Date.html"></iframe>
+</div>
+
+
+
+<!-- ============================== config options ========================== -->
+
+
+
+
+ <div class="hr"></div>
+ <a id="Date-configs"></a>
+
+
+
+ <table cellspacing="0" class="member-table">
+ <caption class="Empty">Config Options - Has None</caption>
+ </table>
+
+
+
+
+
+
+
+
+
+
+
+
+ <!-- ============================== public properties ==================== -->
+
+
+
+ <a id="Date-props"></a>
+
+
+
+
+
+
+
+ <table cellspacing="0" class="member-table">
+ <caption>Public Properties </caption>
+ <tr>
+ <th class="sig-header" colspan="2">Property</th>
+ <th class="sig-header">Description</th>
+ <th class="msource-header">Defined By</th>
+ </tr>
+
+
+
+
+
+
+
+
+ <tr class="property-row config-row-alt0 notInherited">
+ <td class="micon">
+ <a class="exi" href="#expand"> </a>
+ </td>
+ <td class="sig">
+ <a id="Date-prop-DAY" name=".DAY"></a>
+ <div class="fixedFont">
+ <span class="attributes">Date.</span><b class="itemname">DAY</b> :
+ <span type="etype"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>
+ </div>
+ </td>
+ <td class="sig">
+ <div class="mdesc">
+
+
+ <div class="short">
+ Date interval constant
+
+
+
+ </div>
+
+ <div class="long">
+
+ Date interval constant
+
+ </div>
+ </div>
+ </td>
+
+ <td class="msource">
+ Date
+ </td>
+
+ </tr>
+
+
+
+
+ <tr class="property-row config-row-alt1 notInherited">
+ <td class="micon">
+ <a class="exi" href="#expand"> </a>
+ </td>
+ <td class="sig">
+ <a id="Date-prop-HOUR" name=".HOUR"></a>
+ <div class="fixedFont">
+ <span class="attributes">Date.</span><b class="itemname">HOUR</b> :
+ <span type="etype"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>
+ </div>
+ </td>
+ <td class="sig">
+ <div class="mdesc">
+
+
+ <div class="short">
+ Date interval constant
+
+
+
+ </div>
+
+ <div class="long">
+
+ Date interval constant
+
+ </div>
+ </div>
+ </td>
+
+ <td class="msource">
+ Date
+ </td>
+
+ </tr>
+
+
+
+
+ <tr class="property-row config-row-alt0 notInherited">
+ <td class="micon">
+ <a class="exi" href="#expand"> </a>
+ </td>
+ <td class="sig">
+ <a id="Date-prop-MILLI" name=".MILLI"></a>
+ <div class="fixedFont">
+ <span class="attributes">Date.</span><b class="itemname">MILLI</b> :
+ <span type="etype"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>
+ </div>
+ </td>
+ <td class="sig">
+ <div class="mdesc">
+
+
+ <div class="short">
+ Date interval constant
+
+
+
+ </div>
+
+ <div class="long">
+
+ Date interval constant
+
+ </div>
+ </div>
+ </td>
+
+ <td class="msource">
+ Date
+ </td>
+
+ </tr>
+
+
+
+
+ <tr class="property-row config-row-alt1 notInherited">
+ <td class="micon">
+ <a class="exi" href="#expand"> </a>
+ </td>
+ <td class="sig">
+ <a id="Date-prop-MINUTE" name=".MINUTE"></a>
+ <div class="fixedFont">
+ <span class="attributes">Date.</span><b class="itemname">MINUTE</b> :
+ <span type="etype"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>
+ </div>
+ </td>
+ <td class="sig">
+ <div class="mdesc">
+
+
+ <div class="short">
+ Date interval constant
+
+
+
+ </div>
+
+ <div class="long">
+
+ Date interval constant
+
+ </div>
+ </div>
+ </td>
+
+ <td class="msource">
+ Date
+ </td>
+
+ </tr>
+
+
+
+
+ <tr class="property-row config-row-alt0 notInherited">
+ <td class="micon">
+ <a class="exi" href="#expand"> </a>
+ </td>
+ <td class="sig">
+ <a id="Date-prop-MONTH" name=".MONTH"></a>
+ <div class="fixedFont">
+ <span class="attributes">Date.</span><b class="itemname">MONTH</b> :
+ <span type="etype"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>
+ </div>
+ </td>
+ <td class="sig">
+ <div class="mdesc">
+
+
+ <div class="short">
+ Date interval constant
+
+
+
+ </div>
+
+ <div class="long">
+
+ Date interval constant
+
+ </div>
+ </div>
+ </td>
+
+ <td class="msource">
+ Date
+ </td>
+
+ </tr>
+
+
+
+
+ <tr class="property-row config-row-alt1 notInherited">
+ <td class="micon">
+ <a class="exi" href="#expand"> </a>
+ </td>
+ <td class="sig">
+ <a id="Date-prop-SECOND" name=".SECOND"></a>
+ <div class="fixedFont">
+ <span class="attributes">Date.</span><b class="itemname">SECOND</b> :
+ <span type="etype"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>
+ </div>
+ </td>
+ <td class="sig">
+ <div class="mdesc">
+
+
+ <div class="short">
+ Date interval constant
+
+
+
+ </div>
+
+ <div class="long">
+
+ Date interval constant
+
+ </div>
+ </div>
+ </td>
+
+ <td class="msource">
+ Date
+ </td>
+
+ </tr>
+
+
+
+
+ <tr class="property-row config-row-alt0 notInherited">
+ <td class="micon">
+ <a class="exi" href="#expand"> </a>
+ </td>
+ <td class="sig">
+ <a id="Date-prop-YEAR" name=".YEAR"></a>
+ <div class="fixedFont">
+ <span class="attributes">Date.</span><b class="itemname">YEAR</b> :
+ <span type="etype"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>
+ </div>
+ </td>
+ <td class="sig">
+ <div class="mdesc">
+
+
+ <div class="short">
+ Date interval constant
+
+
+
+ </div>
+
+ <div class="long">
+
+ Date interval constant
+
+ </div>
+ </div>
+ </td>
+
+ <td class="msource">
+ Date
+ </td>
+
+ </tr>
+
+
+
+
+ <tr class="property-row config-row-alt1 notInherited">
+ <td class="micon">
+ <a class="exi" href="#expand"> </a>
+ </td>
+ <td class="sig">
+ <a id="Date-prop-dayNames" name=".dayNames"></a>
+ <div class="fixedFont">
+ <span class="attributes">Date.</span><b class="itemname">dayNames</b> :
+ <span type="etype"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span>
+ </div>
+ </td>
+ <td class="sig">
+ <div class="mdesc">
+
+
+ <div class="short">
+ An array of textual day names.
+
+
+
+ </div>
+
+ <div class="long">
+
+ An array of textual day names.<br/>Override these values for international dates, for example...<br/>Date.dayNames = ['SundayInYourLang', 'MondayInYourLang', ...];
+
+ </div>
+ </div>
+ </td>
+
+ <td class="msource">
+ Date
+ </td>
+
+ </tr>
+
+
+
+
+ <tr class="property-row config-row-alt0 notInherited">
+ <td class="micon">
+ <a class="exi" href="#expand"> </a>
+ </td>
+ <td class="sig">
+ <a id="Date-prop-monthNames" name=".monthNames"></a>
+ <div class="fixedFont">
+ <span class="attributes">Date.</span><b class="itemname">monthNames</b> :
+ <span type="etype"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span>
+ </div>
+ </td>
+ <td class="sig">
+ <div class="mdesc">
+
+
+ <div class="short">
+ An array of textual month names.
+
+
+
+ </div>
+
+ <div class="long">
+
+ An array of textual month names.<br/>Override these values for international dates, for example...<br/>Date.monthNames = ['JanInYourLang', 'FebInYourLang', ...];
+
+ </div>
+ </div>
+ </td>
+
+ <td class="msource">
+ Date
+ </td>
+
+ </tr>
+
+
+
+
+
+ <!-- TODO: implement this alt row. also notice non-linked "Defined by" when property is a part of this class.
+ <tr class="property-row alt">
+
+ -->
+
+ </table>
+
+
+ <!-- ============================== methods summary / details ======================== -->
+
+
+ <a id="Date-methods"></a>
+ <!-- constructor?? -->
+
+ <!-- static's first
+
+
+ -->
+
+ <!-- then dynamics first -->
+
+
+
+
+
+
+ <table cellspacing="0" class="member-table">
+ <caption>Public Methods</caption>
+ <tr>
+ <th class="sig-header" colspan="2">Method</th>
+ <th class="msource-header">Defined By</th>
+
+ </tr>
+
+
+
+
+
+
+
+ <tr class="method-row config-row-alt0 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Date-method-parseDate" name=".parseDate"></a>
+ <div class="fixedFont">
+ <span class="attributes">Date.</span><b class="itemname">parseDate</b>
+
+ (<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>)
+
+
+ :
+
+
+ <a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a>
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Parses the passed string using the specified format.</div>
+
+
+
+ <div class="long">
+
+ 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>
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>input</b>
+
+ </dt>
+ <dd>The unparsed date as a string</dd>
+
+ <dt>
+ <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>format</b>
+
+ </dt>
+ <dd>The format the date is in</dd>
+
+ </dl>
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a></span> The parsed date</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Date
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Date-method-add" name=".add"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">add</b>
+
+ (<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>)
+
+
+ :
+
+
+ <a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a>
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Provides a convenient method of performing basic date arithmetic.</div>
+
+
+
+ <div class="long">
+
+ 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>
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>interval</b>
+
+ </dt>
+ <dd>A valid date interval enum value</dd>
+
+ <dt>
+ <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>value</b>
+
+ </dt>
+ <dd>The amount to add to the current date</dd>
+
+ </dl>
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a></span> The new Date instance</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Date
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Date-method-clearTime" name=".clearTime"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">clearTime</b>
+
+ (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>clone</i></B>)
+
+
+ :
+
+
+ <a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a>
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Clears any time information from this date</div>
+
+
+
+ <div class="long">
+
+ Clears any time information from this date
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <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>
+
+ </dt>
+ <dd>true to create a clone of this date, clear the time and return it</dd>
+
+ </dl>
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a></span> this or the clone</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Date
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Date-method-clone" name=".clone"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">clone</b>
+
+ ()
+
+
+ :
+
+
+ <a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a>
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Creates and returns a new Date instance with the exact same date value as the called instance.</div>
+
+
+
+ <div class="long">
+
+ 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>
+
+
+
+
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a></span> The new Date instance</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Date
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Date-method-format" name=".format"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">format</b>
+
+ (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>format</i></B>)
+
+
+ :
+
+
+ <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
+
+
+
+
+
+ </div>
+ <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
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>format</b>
+
+ </dt>
+ <dd>The format string</dd>
+
+ </dl>
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> The formatted date</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Date
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Date-method-getDayOfYear" name=".getDayOfYear"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">getDayOfYear</b>
+
+ ()
+
+
+ :
+
+
+ <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
+
+
+
+
+
+ </div>
+ <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.
+
+
+
+
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <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>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Date
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Date-method-getDaysInMonth" name=".getDaysInMonth"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">getDaysInMonth</b>
+
+ ()
+
+
+ :
+
+
+ <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
+
+
+
+
+
+ </div>
+ <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.
+
+
+
+
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <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>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Date
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Date-method-getElapsed" name=".getElapsed"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">getElapsed</b>
+
+ (<a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a> <B><i>date</i></B>)
+
+
+ :
+
+
+ <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
+
+
+
+
+
+ </div>
+ <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
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont"><a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a></span> <b>date</b>
+
+ </dt>
+ <dd>(optional) Defaults to now</dd>
+
+ </dl>
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> The diff in milliseconds</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Date
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Date-method-getFirstDateOfMonth" name=".getFirstDateOfMonth"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">getFirstDateOfMonth</b>
+
+ ()
+
+
+ :
+
+
+ <a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a>
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Get the first date of this date's month</div>
+
+
+
+ <div class="long">
+
+ Get the first date of this date's month
+
+
+
+
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a></span> </dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Date
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Date-method-getFirstDayOfMonth" name=".getFirstDayOfMonth"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">getFirstDayOfMonth</b>
+
+ ()
+
+
+ :
+
+
+ <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Get the first day of the current month, adjusted for leap year.</div>
+
+
+
+ <div class="long">
+
+ 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>
+
+
+
+
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> The day number (0-6)</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Date
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Date-method-getGMTColonOffset" name=".getGMTColonOffset"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">getGMTColonOffset</b>
+
+ ()
+
+
+ :
+
+
+ <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Get the offset from GMT of the current date (equivalent to the format specifier 'P').</div>
+
+
+
+ <div class="long">
+
+ Get the offset from GMT of the current date (equivalent to the format specifier 'P').
+
+
+
+
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <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>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Date
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Date-method-getGMTOffset" name=".getGMTOffset"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">getGMTOffset</b>
+
+ ()
+
+
+ :
+
+
+ <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
+
+
+
+
+
+ </div>
+ <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').
+
+
+
+
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <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>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Date
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Date-method-getLastDateOfMonth" name=".getLastDateOfMonth"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">getLastDateOfMonth</b>
+
+ ()
+
+
+ :
+
+
+ <a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a>
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Get the last date of this date's month</div>
+
+
+
+ <div class="long">
+
+ Get the last date of this date's month
+
+
+
+
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="./Date.html#constructor" roo:cls="Date.html#constructor">Date</a></span> </dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Date
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Date-method-getLastDayOfMonth" name=".getLastDayOfMonth"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">getLastDayOfMonth</b>
+
+ ()
+
+
+ :
+
+
+ <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Get the last day of the current month, adjusted for leap year.</div>
+
+
+
+ <div class="long">
+
+ 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>
+
+
+
+
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> The day number (0-6)</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Date
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Date-method-getSuffix" name=".getSuffix"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">getSuffix</b>
+
+ ()
+
+
+ :
+
+
+ <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
+
+
+
+
+
+ </div>
+ <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').
+
+
+
+
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> 'st, 'nd', 'rd' or 'th'</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Date
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Date-method-getTimezone" name=".getTimezone"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">getTimezone</b>
+
+ ()
+
+
+ :
+
+
+ <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Get the timezone abbreviation of the current date (equivalent to the format specifier 'T').</div>
+
+
+
+ <div class="long">
+
+ Get the timezone abbreviation of the current date (equivalent to the format specifier 'T').
+
+
+
+
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <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>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Date
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Date-method-getWeekOfYear" name=".getWeekOfYear"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">getWeekOfYear</b>
+
+ ()
+
+
+ :
+
+
+ <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Get the string representation of the numeric week number of the year<br/>(equivalent to the format specifier 'W').</div>
+
+
+
+ <div class="long">
+
+ Get the string representation of the numeric week number of the year<br/>(equivalent to the format specifier 'W').
+
+
+
+
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> '00' through '52'</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Date
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt1 expandable notInherited">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Date-method-isLeapYear" name=".isLeapYear"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">isLeapYear</b>
+
+ ()
+
+
+ :
+
+
+ <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
+
+
+
+
+
+ </div>
+ <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.
+
+
+
+
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <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>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ Date
+
+ </td>
+ </tr>
+
+
+ </table>
+
+
+ <!-- ============================== events summary / details ======================== -->
+
+
+ <a id="Date-events"></a>
+
+
+
+
+
+ <table cellspacing="0" class="member-table">
+ <caption class="Empty">Events - Has None</caption>
+ </table>
+
+
+
+
+
+
+
+
+
+<!-- ============================== footer ================================= -->
+ <div class="fineprint" style="clear:both">
+
+ Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Fri Jul 13 2018 14:10:53 GMT+0800 (HKT)
+ Based on
+ <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>
+ </div>
+ </body>
+</html>