Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / docs / source / Date.html
index 17f6d66..57fe789 100644 (file)
@@ -3,8 +3,8 @@
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>The source code</title>
-  <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
-  <script type="text/javascript" src="../prettify/prettify.js"></script>
+  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
   <style type="text/css">
     .highlight { display: block; background-color: #ddd; }
   </style>
   </script>
 </head>
 <body onload="prettyPrint(); highlight();">
-  <pre class="prettyprint lang-js"><span id='Ext-form-field-Date-method-constructor'><span id='Ext-form-field-Date'>/**
-</span></span> * @class Ext.form.field.Date
- * @extends Ext.form.field.Picker
-
-Provides a date input field with a {@link Ext.picker.Date date picker} dropdown and automatic date
-validation.
-
-This field recognizes and uses the JavaScript Date object as its main {@link #value} type. In addition,
-it recognizes string values which are parsed according to the {@link #format} and/or {@link #altFormats}
-configs. These may be reconfigured to use date formats appropriate for the user's locale.
-
-The field may be limited to a certain range of dates by using the {@link #minValue}, {@link #maxValue},
-{@link #disabledDays}, and {@link #disabledDates} config parameters. These configurations will be used both
-in the field's validation, and in the date picker dropdown by preventing invalid dates from being selected.
-{@img Ext.form.Date/Ext.form.Date.png Ext.form.Date component}
-#Example usage:#
-
-    Ext.create('Ext.form.Panel', {
-        width: 300,
-        bodyPadding: 10,
-        title: 'Dates',
-        items: [{
-            xtype: 'datefield',
-            anchor: '100%',
-            fieldLabel: 'From',
-            name: 'from_date',
-            maxValue: new Date()  // limited to the current date or prior
-        }, {
-            xtype: 'datefield',
-            anchor: '100%',
-            fieldLabel: 'To',
-            name: 'to_date',
-            value: new Date()  // defaults to today
-        }],
-            renderTo: Ext.getBody()
-    });
-
-#Date Formats Examples#
-
-This example shows a couple of different date format parsing scenarios. Both use custom date format
-configurations; the first one matches the configured `format` while the second matches the `altFormats`.
-
-    Ext.create('Ext.form.Panel', {
-        renderTo: Ext.getBody(),
-        width: 300,
-        bodyPadding: 10,
-        title: 'Dates',
-        items: [{
-            xtype: 'datefield',
-            anchor: '100%',
-            fieldLabel: 'Date',
-            name: 'date',
-            // The value matches the format; will be parsed and displayed using that format.
-            format: 'm d Y',
-            value: '2 4 1978'
-        }, {
-            xtype: 'datefield',
-            anchor: '100%',
-            fieldLabel: 'Date',
-            name: 'date',
-            // The value does not match the format, but does match an altFormat; will be parsed
-            // using the altFormat and displayed using the format.
-            format: 'm d Y',
-            altFormats: 'm,d,Y|m.d.Y',
-            value: '2.4.1978'
-        }]
-    });
-
- * @constructor
- * Create a new Date field
- * @param {Object} config
- * 
- * @xtype datefield
- * @markdown
- * @docauthor Jason Johnston &lt;jason@sencha.com&gt;
- */
-Ext.define('Ext.form.field.Date', {
-    extend:'Ext.form.field.Picker',
-    alias: 'widget.datefield',
-    requires: ['Ext.picker.Date'],
-    alternateClassName: ['Ext.form.DateField', 'Ext.form.Date'],
-
-<span id='Ext-form-field-Date-cfg-format'>    /**
-</span>     * @cfg {String} format
-     * The default date format string which can be overriden for localization support.  The format must be
-     * valid according to {@link Ext.Date#parse} (defaults to &lt;tt&gt;'m/d/Y'&lt;/tt&gt;).
-     */
-    format : &quot;m/d/Y&quot;,
-<span id='Ext-form-field-Date-cfg-altFormats'>    /**
-</span>     * @cfg {String} altFormats
-     * Multiple date formats separated by &quot;&lt;tt&gt;|&lt;/tt&gt;&quot; to try when parsing a user input value and it
-     * does not match the defined format (defaults to
-     * &lt;tt&gt;'m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j'&lt;/tt&gt;).
-     */
-    altFormats : &quot;m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j&quot;,
-<span id='Ext-form-field-Date-cfg-disabledDaysText'>    /**
-</span>     * @cfg {String} disabledDaysText
-     * The tooltip to display when the date falls on a disabled day (defaults to &lt;tt&gt;'Disabled'&lt;/tt&gt;)
-     */
-    disabledDaysText : &quot;Disabled&quot;,
-<span id='Ext-form-field-Date-cfg-disabledDatesText'>    /**
-</span>     * @cfg {String} disabledDatesText
-     * The tooltip text to display when the date falls on a disabled date (defaults to &lt;tt&gt;'Disabled'&lt;/tt&gt;)
-     */
-    disabledDatesText : &quot;Disabled&quot;,
-<span id='Ext-form-field-Date-cfg-minText'>    /**
-</span>     * @cfg {String} minText
-     * The error text to display when the date in the cell is before &lt;tt&gt;{@link #minValue}&lt;/tt&gt; (defaults to
-     * &lt;tt&gt;'The date in this field must be after {minValue}'&lt;/tt&gt;).
-     */
-    minText : &quot;The date in this field must be equal to or after {0}&quot;,
-<span id='Ext-form-field-Date-cfg-maxText'>    /**
-</span>     * @cfg {String} maxText
-     * The error text to display when the date in the cell is after &lt;tt&gt;{@link #maxValue}&lt;/tt&gt; (defaults to
-     * &lt;tt&gt;'The date in this field must be before {maxValue}'&lt;/tt&gt;).
-     */
-    maxText : &quot;The date in this field must be equal to or before {0}&quot;,
-<span id='Ext-form-field-Date-cfg-invalidText'>    /**
-</span>     * @cfg {String} invalidText
-     * The error text to display when the date in the field is invalid (defaults to
-     * &lt;tt&gt;'{value} is not a valid date - it must be in the format {format}'&lt;/tt&gt;).
-     */
-    invalidText : &quot;{0} is not a valid date - it must be in the format {1}&quot;,
-<span id='Ext-form-field-Date-cfg-triggerCls'>    /**
-</span>     * @cfg {String} triggerCls
-     * An additional CSS class used to style the trigger button.  The trigger will always get the
-     * class &lt;tt&gt;'x-form-trigger'&lt;/tt&gt; and &lt;tt&gt;triggerCls&lt;/tt&gt; will be &lt;b&gt;appended&lt;/b&gt; if specified
-     * (defaults to &lt;tt&gt;'x-form-date-trigger'&lt;/tt&gt; which displays a calendar icon).
-     */
-    triggerCls : Ext.baseCSSPrefix + 'form-date-trigger',
-<span id='Ext-form-field-Date-cfg-showToday'>    /**
-</span>     * @cfg {Boolean} showToday
-     * &lt;tt&gt;false&lt;/tt&gt; to hide the footer area of the Date picker containing the Today button and disable
-     * the keyboard handler for spacebar that selects the current date (defaults to &lt;tt&gt;true&lt;/tt&gt;).
-     */
-    showToday : true,
-<span id='Ext-form-field-Date-cfg-minValue'>    /**
-</span>     * @cfg {Date/String} minValue
-     * The minimum allowed date. Can be either a Javascript date object or a string date in a
-     * valid format (defaults to undefined).
-     */
-<span id='Ext-form-field-Date-cfg-maxValue'>    /**
-</span>     * @cfg {Date/String} maxValue
-     * The maximum allowed date. Can be either a Javascript date object or a string date in a
-     * valid format (defaults to undefined).
-     */
-<span id='Ext-form-field-Date-cfg-disabledDays'>    /**
-</span>     * @cfg {Array} disabledDays
-     * An array of days to disable, 0 based (defaults to undefined). Some examples:&lt;pre&gt;&lt;code&gt;
-// disable Sunday and Saturday:
-disabledDays:  [0, 6]
-// disable weekdays:
-disabledDays: [1,2,3,4,5]
-     * &lt;/code&gt;&lt;/pre&gt;
-     */
-<span id='Ext-form-field-Date-cfg-disabledDates'>    /**
-</span>     * @cfg {Array} disabledDates
-     * An array of &quot;dates&quot; to disable, as strings. These strings will be used to build a dynamic regular
-     * expression so they are very powerful. Some examples:&lt;pre&gt;&lt;code&gt;
-// disable these exact dates:
-disabledDates: [&quot;03/08/2003&quot;, &quot;09/16/2003&quot;]
-// disable these days for every year:
-disabledDates: [&quot;03/08&quot;, &quot;09/16&quot;]
-// only match the beginning (useful if you are using short years):
-disabledDates: [&quot;^03/08&quot;]
-// disable every day in March 2006:
-disabledDates: [&quot;03/../2006&quot;]
-// disable every day in every March:
-disabledDates: [&quot;^03&quot;]
-     * &lt;/code&gt;&lt;/pre&gt;
-     * Note that the format of the dates included in the array should exactly match the {@link #format} config.
-     * In order to support regular expressions, if you are using a {@link #format date format} that has &quot;.&quot; in
-     * it, you will have to escape the dot when restricting dates. For example: &lt;tt&gt;[&quot;03\\.08\\.03&quot;]&lt;/tt&gt;.
-     */
-    
-<span id='Ext-form-field-Date-cfg-submitFormat'>    /**
-</span>     * @cfg {String} submitFormat The date format string which will be submitted to the server.  
-     * The format must be valid according to {@link Ext.Date#parse} (defaults to &lt;tt&gt;{@link #format}&lt;/tt&gt;).
-     */
-
-    // in the absence of a time value, a default value of 12 noon will be used
-    // (note: 12 noon was chosen because it steers well clear of all DST timezone changes)
-    initTime: '12', // 24 hour format
-
-    initTimeFormat: 'H',
-
-    matchFieldWidth: false,
-<span id='Ext-form-field-Date-cfg-startDay'>    /**
-</span>     * @cfg {Number} startDay
-     * Day index at which the week should begin, 0-based (defaults to 0, which is Sunday)
-     */
-    startDay: 0,
-    
-    initComponent : function(){
-        var me = this,
-            isString = Ext.isString,
-            min, max;
-
-        min = me.minValue;
-        max = me.maxValue;
-        if(isString(min)){
-            me.minValue = me.parseDate(min);
-        }
-        if(isString(max)){
-            me.maxValue = me.parseDate(max);
-        }
-        me.disabledDatesRE = null;
-        me.initDisabledDays();
-
-        me.callParent();
-    },
-
-    initValue: function() {
-        var me = this,
-            value = me.value;
-
-        // If a String value was supplied, try to convert it to a proper Date
-        if (Ext.isString(value)) {
-            me.value = me.rawToValue(value);
-        }
-
-        me.callParent();
-    },
-
-    // private
-    initDisabledDays : function(){
-        if(this.disabledDates){
-            var dd = this.disabledDates,
-                len = dd.length - 1,
-                re = &quot;(?:&quot;;
-
-            Ext.each(dd, function(d, i){
-                re += Ext.isDate(d) ? '^' + Ext.String.escapeRegex(d.dateFormat(this.format)) + '$' : dd[i];
-                if (i !== len) {
-                    re += '|';
-                }
-            }, this);
-            this.disabledDatesRE = new RegExp(re + ')');
-        }
-    },
-
-<span id='Ext-form-field-Date-method-setDisabledDates'>    /**
-</span>     * Replaces any existing disabled dates with new values and refreshes the Date picker.
-     * @param {Array} disabledDates An array of date strings (see the &lt;tt&gt;{@link #disabledDates}&lt;/tt&gt; config
-     * for details on supported values) used to disable a pattern of dates.
-     */
-    setDisabledDates : function(dd){
-        var me = this,
-            picker = me.picker;
-            
-        me.disabledDates = dd;
-        me.initDisabledDays();
-        if (picker) {
-            picker.setDisabledDates(me.disabledDatesRE);
-        }
-    },
-
-<span id='Ext-form-field-Date-method-setDisabledDays'>    /**
-</span>     * Replaces any existing disabled days (by index, 0-6) with new values and refreshes the Date picker.
-     * @param {Array} disabledDays An array of disabled day indexes. See the &lt;tt&gt;{@link #disabledDays}&lt;/tt&gt;
-     * config for details on supported values.
-     */
-    setDisabledDays : function(dd){
-        var picker = this.picker;
-            
-        this.disabledDays = dd;
-        if (picker) {
-            picker.setDisabledDays(dd);
-        }
-    },
-
-<span id='Ext-form-field-Date-method-setMinValue'>    /**
-</span>     * Replaces any existing &lt;tt&gt;{@link #minValue}&lt;/tt&gt; with the new value and refreshes the Date picker.
-     * @param {Date} value The minimum date that can be selected
-     */
-    setMinValue : function(dt){
-        var me = this,
-            picker = me.picker,
-            minValue = (Ext.isString(dt) ? me.parseDate(dt) : dt);
-            
-        me.minValue = minValue;
-        if (picker) {
-            picker.minText = Ext.String.format(me.minText, me.formatDate(me.minValue));
-            picker.setMinDate(minValue);
-        }
-    },
-
-<span id='Ext-form-field-Date-method-setMaxValue'>    /**
-</span>     * Replaces any existing &lt;tt&gt;{@link #maxValue}&lt;/tt&gt; with the new value and refreshes the Date picker.
-     * @param {Date} value The maximum date that can be selected
-     */
-    setMaxValue : function(dt){
-        var me = this,
-            picker = me.picker,
-            maxValue = (Ext.isString(dt) ? me.parseDate(dt) : dt);
-            
-        me.maxValue = maxValue;
-        if (picker) {
-            picker.maxText = Ext.String.format(me.maxText, me.formatDate(me.maxValue));
-            picker.setMaxDate(maxValue);
-        }
-    },
-
-<span id='Ext-form-field-Date-method-getErrors'>    /**
-</span>     * Runs all of Date's validations and returns an array of any errors. Note that this first
-     * runs Text's validations, so the returned array is an amalgamation of all field errors.
-     * The additional validation checks are testing that the date format is valid, that the chosen
-     * date is within the min and max date constraints set, that the date chosen is not in the disabledDates
-     * regex and that the day chosed is not one of the disabledDays.
-     * @param {Mixed} value The value to get errors for (defaults to the current field value)
-     * @return {Array} All validation errors for this field
-     */
-    getErrors: function(value) {
-        var me = this,
-            format = Ext.String.format,
-            clearTime = Ext.Date.clearTime,
-            errors = me.callParent(arguments),
-            disabledDays = me.disabledDays,
-            disabledDatesRE = me.disabledDatesRE,
-            minValue = me.minValue,
-            maxValue = me.maxValue,
-            len = disabledDays ? disabledDays.length : 0,
-            i = 0,
-            svalue,
-            fvalue,
-            day,
-            time;
-
-        value = me.formatDate(value || me.processRawValue(me.getRawValue()));
-
-        if (value === null || value.length &lt; 1) { // if it's blank and textfield didn't flag it then it's valid
-             return errors;
-        }
-
-        svalue = value;
-        value = me.parseDate(value);
-        if (!value) {
-            errors.push(format(me.invalidText, svalue, me.format));
-            return errors;
-        }
-
-        time = value.getTime();
-        if (minValue &amp;&amp; time &lt; clearTime(minValue).getTime()) {
-            errors.push(format(me.minText, me.formatDate(minValue)));
-        }
-
-        if (maxValue &amp;&amp; time &gt; clearTime(maxValue).getTime()) {
-            errors.push(format(me.maxText, me.formatDate(maxValue)));
-        }
-
-        if (disabledDays) {
-            day = value.getDay();
-
-            for(; i &lt; len; i++) {
-                if (day === disabledDays[i]) {
-                    errors.push(me.disabledDaysText);
-                    break;
-                }
-            }
-        }
-
-        fvalue = me.formatDate(value);
-        if (disabledDatesRE &amp;&amp; disabledDatesRE.test(fvalue)) {
-            errors.push(format(me.disabledDatesText, fvalue));
-        }
-
-        return errors;
-    },
-
-    rawToValue: function(rawValue) {
-        return this.parseDate(rawValue) || rawValue || null;
-    },
-
-    valueToRaw: function(value) {
-        return this.formatDate(this.parseDate(value));
-    },
-
-<span id='Ext-form-field-Date-method-setValue'>    /**
-</span>     * Sets the value of the date field.  You can pass a date object or any string that can be
-     * parsed into a valid date, using &lt;tt&gt;{@link #format}&lt;/tt&gt; as the date format, according
-     * to the same rules as {@link Ext.Date#parse} (the default format used is &lt;tt&gt;&quot;m/d/Y&quot;&lt;/tt&gt;).
-     * &lt;br /&gt;Usage:
-     * &lt;pre&gt;&lt;code&gt;
-//All of these calls set the same date value (May 4, 2006)
-
-//Pass a date object:
-var dt = new Date('5/4/2006');
-dateField.setValue(dt);
-
-//Pass a date string (default format):
-dateField.setValue('05/04/2006');
-
-//Pass a date string (custom format):
-dateField.format = 'Y-m-d';
-dateField.setValue('2006-05-04');
-&lt;/code&gt;&lt;/pre&gt;
-     * @param {String/Date} date The date or valid date string
-     * @return {Ext.form.field.Date} this
-     * @method setValue
-     */
-
-<span id='Ext-form-field-Date-method-safeParse'>    /**
-</span>     * Attempts to parse a given string value using a given {@link Ext.Date#parse date format}.
-     * @param {String} value The value to attempt to parse
-     * @param {String} format A valid date format (see {@link Ext.Date#parse})
-     * @return {Date} The parsed Date object, or null if the value could not be successfully parsed.
-     */
-    safeParse : function(value, format) {
-        var me = this,
-            utilDate = Ext.Date,
-            parsedDate,
-            result = null;
-            
-        if (utilDate.formatContainsHourInfo(format)) {
-            // if parse format contains hour information, no DST adjustment is necessary
-            result = utilDate.parse(value, format);
-        } else {
-            // set time to 12 noon, then clear the time
-            parsedDate = utilDate.parse(value + ' ' + me.initTime, format + ' ' + me.initTimeFormat);
-            if (parsedDate) {
-                result = utilDate.clearTime(parsedDate);
-            }
-        }
-        return result;
-    },
-    
-    // @private
-    getSubmitValue: function() {
-        var me = this,
-            format = me.submitFormat || me.format,
-            value = me.getValue();
-            
-        return value ? Ext.Date.format(value, format) : null;
-    },
-
-<span id='Ext-form-field-Date-method-parseDate'>    /**
-</span>     * @private
-     */
-    parseDate : function(value) {
-        if(!value || Ext.isDate(value)){
-            return value;
-        }
-
-        var me = this,
-            val = me.safeParse(value, me.format),
-            altFormats = me.altFormats,
-            altFormatsArray = me.altFormatsArray,
-            i = 0,
-            len;
-
-        if (!val &amp;&amp; altFormats) {
-            altFormatsArray = altFormatsArray || altFormats.split('|');
-            len = altFormatsArray.length;
-            for (; i &lt; len &amp;&amp; !val; ++i) {
-                val = me.safeParse(value, altFormatsArray[i]);
-            }
-        }
-        return val;
-    },
-
-    // private
-    formatDate : function(date){
-        return Ext.isDate(date) ? Ext.Date.dateFormat(date, this.format) : date;
-    },
-
-    createPicker: function() {
-        var me = this,
-            format = Ext.String.format;
-
-        return Ext.create('Ext.picker.Date', {
-            ownerCt: me.ownerCt,
-            renderTo: document.body,
-            floating: true,
-            hidden: true,
-            focusOnShow: true,
-            minDate: me.minValue,
-            maxDate: me.maxValue,
-            disabledDatesRE: me.disabledDatesRE,
-            disabledDatesText: me.disabledDatesText,
-            disabledDays: me.disabledDays,
-            disabledDaysText: me.disabledDaysText,
-            format: me.format,
-            showToday: me.showToday,
-            startDay: me.startDay,
-            minText: format(me.minText, me.formatDate(me.minValue)),
-            maxText: format(me.maxText, me.formatDate(me.maxValue)),
-            listeners: {
-                scope: me,
-                select: me.onSelect
-            },
-            keyNavConfig: {
-                esc: function() {
-                    me.collapse();
-                }
-            }
-        });
-    },
-
-    onSelect: function(m, d) {
-        var me = this;
-        
-        me.setValue(d);
-        me.fireEvent('select', me, d);
-        me.collapse();
-    },
-
-<span id='Ext-form-field-Date-method-onExpand'>    /**
-</span>     * @private
-     * Sets the Date picker's value to match the current field value when expanding.
-     */
-    onExpand: function() {
-        var me = this,
-            value = me.getValue();
-        me.picker.setValue(Ext.isDate(value) ? value : new Date());
-    },
-
-<span id='Ext-form-field-Date-method-onCollapse'>    /**
-</span>     * @private
-     * Focuses the field when collapsing the Date picker.
-     */
-    onCollapse: function() {
-        this.focus(false, 60);
-    },
-
-    // private
-    beforeBlur : function(){
-        var me = this,
-            v = me.parseDate(me.getRawValue()),
-            focusTask = me.focusTask;
-        
-        if (focusTask) {
-            focusTask.cancel();
-        }
-        
-        if (v) {
-            me.setValue(v);
-        }
-    }
+  <pre class="prettyprint lang-js"><span id='Date'>/**
+</span> * @class Date
+ *
+ * Creates `Date` instances which let you work with dates and times.
+ *
+ * If you supply no arguments, the constructor creates a `Date` object for today's
+ * date and time according to local time. If you supply some arguments but not
+ * others, the missing arguments are set to 0. If you supply any arguments, you
+ * must supply at least the year, month, and day. You can omit the hours, minutes,
+ * seconds, and milliseconds.
+ *
+ * The date is measured in milliseconds since midnight 01 January, 1970 UTC. A day
+ * holds 86,400,000 milliseconds. The `Date` object range is -100,000,000 days to
+ * 100,000,000 days relative to 01 January, 1970 UTC.
+ *
+ * The `Date` object provides uniform behavior across platforms.
+ *
+ * The `Date` object supports a number of UTC (universal) methods, as well as
+ * local time methods. UTC, also known as Greenwich Mean Time (GMT), refers to the
+ * time as set by the World Time Standard. The local time is the time known to the
+ * computer where JavaScript is executed.
+ *
+ * Invoking `Date` in a non-constructor context (i.e., without the `new` operator)
+ * will return a string representing the current time.
+ *
+ * Note that `Date` objects can only be instantiated by calling `Date` or using it
+ * as a constructor; unlike other JavaScript object types, `Date` objects have no
+ * literal syntax.
+ *
+ * # Several ways to assign dates
+ *
+ * The following example shows several ways to assign dates:
+ *
+ *     today = new Date();
+ *     birthday = new Date(&quot;December 19, 1989 03:24:00&quot;);
+ *     birthday = new Date(1989,11,19);
+ *     birthday = new Date(1989,11,17,3,24,0);
+ *
+ * # Calculating elapsed time
+ *
+ * The following examples show how to determine the elapsed time between two dates:
+ *
+ *     // using static methods
+ *     var start = Date.now();
+ *     // the event you'd like to time goes here:
+ *     doSomethingForALongTime();
+ *     var end = Date.now();
+ *     var elapsed = end - start; // time in milliseconds
+ *
+ *     // if you have Date objects
+ *     var start = new Date();
+ *     // the event you'd like to time goes here:
+ *     doSomethingForALongTime();
+ *     var end = new Date();
+ *     var elapsed = end.getTime() - start.getTime(); // time in milliseconds
+ *
+ *     // if you want to test a function and get back its return
+ *     function printElapsedTime (fTest) {
+ *         var nStartTime = Date.now(), vReturn = fTest(), nEndTime = Date.now();
+ *         alert(&quot;Elapsed time: &quot; + String(nEndTime - nStartTime) + &quot;
+ *         milliseconds&quot;);
+ *         return vReturn;
+ *     }
+ *
+ *     yourFunctionReturn = printElapsedTime(yourFunction);
+ *
+ * # ISO 8601 formatted dates
+ *
+ * The following example shows how to formate a date in an ISO 8601 format using
+ * UTC:
+ *
+ *     // use a function for the exact format desired...
+ *     function ISODateString(d){
+ *     function pad(n){return n&lt;10 ? '0'+n : n}
+ *     return d.getUTCFullYear()+'-'
+ *         + pad(d.getUTCMonth()+1)+'-'
+ *         + pad(d.getUTCDate())+'T'
+ *         + pad(d.getUTCHours())+':'
+ *         + pad(d.getUTCMinutes())+':'
+ *         + pad(d.getUTCSeconds())+'Z'}
+ *
+ *     var d = new Date();
+ *     print(ISODateString(d)); // prints something like 2009-09-28T19:03:12Z
+ *
+ * &lt;div class=&quot;notice&quot;&gt;
+ * Documentation for this class comes from &lt;a href=&quot;https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date&quot;&gt;MDN&lt;/a&gt;
+ * and is available under &lt;a href=&quot;http://creativecommons.org/licenses/by-sa/2.0/&quot;&gt;Creative Commons: Attribution-Sharealike license&lt;/a&gt;.
+ * &lt;/div&gt;
+ */
+
+<span id='Date-method-constructor'>/**
+</span> * @method constructor
+ * Creates new Date object.
+ *
+ * @param {Number/String} [year]
+ * Either UNIX timestamp, date string, or year (when month and day parameters also provided):
+ *
+ * - Integer value representing the number of milliseconds since 1 January 1970
+ *   00:00:00 UTC (Unix Epoch).
+ *
+ * - String value representing a date. The string should be in a format recognized
+ *   by the parse method (IETF-compliant RFC 1123 timestamps).
+ *
+ * - Integer value representing the year. For compatibility (in order to avoid the
+ *   Y2K problem), you should always specify the year in full; use 1998, rather
+ *   than 98.
+ *
+ * @param {Number} [month]
+ * Integer value representing the month, beginning with 0 for January to 11
+ * for December.
+ * @param {Number} [day]
+ * Integer value representing the day of the month (1-31).
+ * @param {Number} [hour]
+ * Integer value representing the hour of the day (0-23).
+ * @param {Number} [minute]
+ * Integer value representing the minute segment (0-59) of a time reading.
+ * @param {Number} [second]
+ * Integer value representing the second segment (0-59) of a time reading.
+ * @param {Number} [millisecond]
+ * Integer value representing the millisecond segment (0-999) of a time reading.
+ */
+
+
+//Methods
+
+<span id='Date-static-method-now'>/**
+</span> * @method now
+ * @static
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The `now` method returns the milliseconds elapsed since 1 January 1970 00:00:00 UTC up until now as
+ * a number.
+ *
+ * When using `now` to create timestamps or unique IDs, keep in mind that the resolution may be 15
+ * milliseconds on Windows, so you could end up with several equal values if `now` is called multiple
+ * times within a short time span.
+ *
+ * @return {Number} Returns the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.
+ */
+
+<span id='Date-static-method-parse'>/**
+</span> * @method parse
+ * @static
+ * Parses a string representation of a date, and returns the number of milliseconds
+ * since January 1, 1970, 00:00:00, local time.
+ *
+ * The `parse` method takes a date string (such as `&quot;Dec 25, 1995&quot;`) and returns the number of
+ * milliseconds since January 1, 1970, 00:00:00 UTC. The local time zone is used to interpret
+ * arguments that do not contain time zone information. This function is useful for setting date
+ * values based on string values, for example in conjunction with the `setTime` method and the
+ * {@link Date} object.
+ *
+ * Given a string representing a time, parse returns the time value. It accepts the IETF standard (RFC
+ * 1123 Section 5.2.14 and elsewhere) date syntax: `&quot;Mon, 25 Dec 1995 13:30:00 GMT&quot;`. It understands
+ * the continental US time-zone abbreviations, but for general use, use a time-zone offset, for
+ * example, `&quot;Mon, 25 Dec 1995 13:30:00 GMT+0430&quot;` (4 hours, 30 minutes east of the Greenwich
+ * meridian). If you do not specify a time zone, the local time zone is assumed. GMT and UTC are
+ * considered equivalent.
+ *
+ * ### Using parse
+ *
+ * If `IPOdate` is an existing `Date` object, then you can set it to August 9, 1995 (local time) as
+ * follows:
+ *
+ *     IPOdate.setTime(Date.parse(&quot;Aug 9, 1995&quot;));
+ *
+ * Some other examples:
+ *
+ *     // Returns 807937200000 in time zone GMT-0300, and other values in other
+ *     // timezones, since the argument does not specify a time zone.
+ *     Date.parse(&quot;Aug 9, 1995&quot;);
+ *
+ *     // Returns 807926400000 no matter the local time zone.
+ *     Date.parse(&quot;Wed, 09 Aug 1995 00:00:00 GMT&quot;);
+ *
+ *     // Returns 807937200000 in timezone GMT-0300, and other values in other
+ *     // timezones, since there is no time zone specifier in the argument.
+ *     Date.parse(&quot;Wed, 09 Aug 1995 00:00:00&quot;);
+ *
+ *     // Returns 0 no matter the local time zone.
+ *     Date.parse(&quot;Thu, 01 Jan 1970 00:00:00 GMT&quot;);
+ *
+ *     // Returns 14400000 in timezone GMT-0400, and other values in other
+ *     // timezones, since there is no time zone specifier in the argument.
+ *     Date.parse(&quot;Thu, 01 Jan 1970 00:00:00&quot;);
+ *
+ *     // Returns 14400000 no matter the local time zone.
+ *     Date.parse(&quot;Thu, 01 Jan 1970 00:00:00 GMT-0400&quot;);
+ *
+ * @param {String} dateString A string representing a date.
+ * @return {Number} Number of milliseconds since January 1, 1970, 00:00:00, local time.
+ */
+
+<span id='Date-static-method-UTC'>/**
+</span> * @method UTC
+ * @static
+ * Accepts the same parameters as the longest form of the constructor, and returns
+ * the number of milliseconds in a `Date` object since January 1, 1970, 00:00:00,
+ * universal time.
+ *
+ * `UTC` takes comma-delimited date parameters and returns the number of milliseconds between January
+ * 1, 1970, 00:00:00, universal time and the time you specified.
+ *
+ * You should specify a full year for the year; for example, 1998. If a year between 0 and 99 is
+ * specified, the method converts the year to a year in the 20th century (1900 + year); for example,
+ * if you specify 95, the year 1995 is used.
+ *
+ * The `UTC` method differs from the `Date` constructor in two ways.
+ * *   `Date.UTC` uses universal time instead of the local time.
+ * *   `Date.UTC` returns a time value as a number instead of creating a `Date` object.
+ *
+ * If a parameter you specify is outside of the expected range, the `UTC` method updates the other
+ * parameters to allow for your number. For example, if you use 15 for month, the year will be
+ * incremented by 1 (year + 1), and 3 will be used for the month.
+ *
+ * Because `UTC` is a static method of `Date`, you always use it as `Date.UTC()`, rather than as a
+ * method of a `Date` object you created.
+*
+ * The following statement creates a `Date` object using GMT instead of local time:
+ *
+ *     gmtDate = new Date(Date.UTC(96, 11, 1, 0, 0, 0));
+ *
+ * @param {Number} year A year after 1900.
+ * @param {Number} month An integer between 0 and 11 representing the month.
+ * @param {Number} date An integer between 1 and 31 representing the day of the month.
+ * @param {Number} hrs An integer between 0 and 23 representing the hours.
+ * @param {Number} min An integer between 0 and 59 representing the minutes.
+ * @param {Number} sec An integer between 0 and 59 representing the seconds.
+ * @param {Number} ms An integer between 0 and 999 representing the milliseconds.
+ * @return {Date} Number of milliseconds since January 1, 1970, 00:00:00, universal time.
+ */
+
+//Methods
+
+<span id='Date-method-getDate'>/**
+</span> * @method getDate
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The second statement below assigns the value 25 to the variable `day`, based on the value of the
+ * `Date` object `Xmas95`.
+ *
+ *     Xmas95 = new Date(&quot;December 25, 1995 23:15:00&quot;)
+ *     day = Xmas95.getDate()
+ *
+ * @return {Number} Value between 1 and 31.
+ */
+
+<span id='Date-method-getDay'>/**
+</span> * @method getDay
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The value returned by `getDay` is an integer corresponding to the day of the week: 0 for Sunday, 1
+ * for Monday, 2 for Tuesday, and so on.
+ *
+ * The second statement below assigns the value 1 to `weekday`, based on the value of the `Date`
+ * object `Xmas95`. December 25, 1995, is a Monday.
+ *
+ *     Xmas95 = new Date(&quot;December 25, 1995 23:15:00&quot;);
+ *     weekday = Xmas95.getDay();
+ *
+ * @return {Number} A numeric representation of the day from Sunday (0) to
+ * Saturday (6).
+ */
+
+<span id='Date-method-getFullYear'>/**
+</span> * @method getFullYear
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The value returned by `getFullYear` is an absolute number. For dates between the years 1000 and
+ * 9999, `getFullYear` returns a four-digit number, for example, 1995. Use this function to make sure
+ * a year is compliant with years after 2000.
+ *
+ * Use this method instead of the `getYear` method.
+ *
+ * The following example assigns the four-digit value of the current year to the variable yr.
+ *
+ *     var today = new Date();
+ *     var yr = today.getFullYear();
+ *
+ * @return {Number} Four digit representation of the year.
+ */
+
+<span id='Date-method-getHours'>/**
+</span> * @method getHours
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The second statement below assigns the value 23 to the variable `hours`, based on the value of the
+ * `Date` object `Xmas95`.
+ *
+ *     Xmas95 = new Date(&quot;December 25, 1995 23:15:00&quot;)
+ *     hours = Xmas95.getHours()
+ *
+ * @return {Number} Value between 0 and 23, using 24-hour clock.
+ */
+
+<span id='Date-method-getMilliseconds'>/**
+</span> * @method getMilliseconds
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The following example assigns the milliseconds portion of the current time to the variable ms.
+ *
+ *     var ms;
+ *     Today = new Date();
+ *     ms = Today.getMilliseconds();
+ *
+ * @return {Number} A number between 0 and 999.
+ */
+
+<span id='Date-method-getMinutes'>/**
+</span> * @method getMinutes
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The second statement below assigns the value 15 to the variable `minutes`, based on the value of
+ * the `Date` object `Xmas95`.
+ *
+ *     Xmas95 = new Date(&quot;December 25, 1995 23:15:00&quot;)
+ *     minutes = Xmas95.getMinutes()
+ *
+ * @return {Number} Value between 0 and 59.
+ */
+
+<span id='Date-method-getMonth'>/**
+</span> * @method getMonth
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The second statement below assigns the value 11 to the variable `month`, based on the value of the
+ * `Date` object `Xmas95`.
+ *
+ *     Xmas95 = new Date(&quot;December 25, 1995 23:15:00&quot;)
+ *     month = Xmas95.getMonth()
+ *
+ * @return {Number} An integer between 0 and 11. 0 corresponds to January, 1 to February, and so on.
+ */
+
+<span id='Date-method-getSeconds'>/**
+</span> * @method getSeconds
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The second statement below assigns the value 30 to the variable `secs`, based on the value of the
+ * `Date` object `Xmas95`.
+ *
+ *     Xmas95 = new Date(&quot;December 25, 1995 23:15:30&quot;)
+ *     secs = Xmas95.getSeconds()
+ *
+ * @return {Number} Value between 0 and 59.
+ */
+
+<span id='Date-method-getTime'>/**
+</span> * @method getTime
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The value returned by the `getTime` method is the number of milliseconds since 1 January 1970
+ * 00:00:00 UTC. You can use this method to help assign a date and time to another `Date` object.
+ *
+ * This method is functionally equivalent to the `valueOf` method.
+ *
+ * Using getTime for copying dates
+ *
+ * Constructing a date object with the identical time value.
+ *
+ *     var birthday = new Date(1994, 12, 10);
+ *     var copy = new Date();
+ *     copy.setTime(birthday.getTime());
+ *
+ * Measuring execution time
+ *
+ * Subtracting two subsequent getTime calls on newly generated Date objects, give the time span
+ * between these two calls. This can be used to calculate the executing time of some operations.
+ *
+ *     var end, start;
+ *
+ *     start = new Date();
+ *     for (var i = 0; i &lt; 1000; i++)
+ *         Math.sqrt(i);
+ *     end = new Date();
+ *
+ *     console.log(&quot;Operation took &quot; + (end.getTime() - start.getTime()) + &quot; msec&quot;);
+ *
+ * @return {Number} Number of milliseconds since 1/1/1970 (GMT).
+ */
+
+<span id='Date-method-getTimezoneOffset'>/**
+</span> * @method getTimezoneOffset
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The time-zone offset is the difference, in minutes, between UTC and local time. Note that this
+ * means that the offset is positive if the local timezone is behind UTC and negative if it is ahead.
+ * For example, if your time zone is UTC+10 (Australian Eastern Standard Time), -600 will be returned.
+ * Daylight savings time prevents this value from being a constant even for a given locale
+ *
+ *     x = new Date()
+ *     currentTimeZoneOffsetInHours = x.getTimezoneOffset()/60
+ *
+ * @return {Number} Minutes between GMT and local time.
+ */
+
+<span id='Date-method-getUTCDate'>/**
+</span> * @method getUTCDate
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The following example assigns the day portion of the current date to the variable `d`.
+ *
+ *     var d;
+ *     Today = new Date();
+ *     d = Today.getUTCDate();
+ *
+ * @return {Number} Integer between 1 and 31 representing the day.
+ */
+
+<span id='Date-method-getUTCDay'>/**
+</span> * @method getUTCDay
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The following example assigns the weekday portion of the current date to the variable `weekday`.
+ *
+ *     var weekday;
+ *     Today = new Date()
+ *     weekday = Today.getUTCDay()
+ *
+ * @return {Number} A numeric representation of the day from Sunday (0) to
+ * Saturday (6).
+ */
+
+<span id='Date-method-getUTCFullYear'>/**
+</span> * @method getUTCFullYear
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The following example assigns the four-digit value of the current year to the variable `yr`.
+ *
+ *     var yr;
+ *     Today = new Date();
+ *     yr = Today.getUTCFullYear();
+ *
+ * @return {Number} Four digit representation of the year.
+ */
+
+<span id='Date-method-getUTCHours'>/**
+</span> * @method getUTCHours
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The following example assigns the hours portion of the current time to the variable `hrs`.
+ *
+ *     var hrs;
+ *     Today = new Date();
+ *     hrs = Today.getUTCHours();
+ *
+ * @return {Number} Value between 0 and 23.
+ */
+
+<span id='Date-method-getUTCMilliseconds'>/**
+</span> * @method getUTCMilliseconds
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The following example assigns the milliseconds portion of the current time to the variable `ms`.
+ *
+ *     var ms;
+ *     Today = new Date();
+ *     ms = Today.getUTCMilliseconds();
+ *
+ * @return {Number} Milliseconds portion of the Date.
+ */
+
+<span id='Date-method-getUTCMinutes'>/**
+</span> * @method getUTCMinutes
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The following example assigns the minutes portion of the current time to the variable `min`.
+ *
+ *     var min;
+ *     Today = new Date();
+ *     min = Today.getUTCMinutes();
+ *
+ * @return {Number} Value between 0 and 59.
+ */
+
+<span id='Date-method-getUTCMonth'>/**
+</span> * @method getUTCMonth
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The following example assigns the month portion of the current date to the variable `mon`.
+ *
+ *     var mon;
+ *     Today = new Date();
+ *     mon = Today.getUTCMonth();
+ *
+ * @return {Number} Value between 0 (January) and 11 (December).
+*/
+
+<span id='Date-method-getUTCSeconds'>/**
+</span> * @method getUTCSeconds
+ * Returns the numeric value corresponding to the current time.
+ *
+ * The following example assigns the seconds portion of the current time to the variable `sec`.
+ *
+ *     var sec;
+ *     Today = new Date();
+ *     sec = Today.getUTCSeconds();
+ *
+ * @return {Number} Value between 0 and 59.
+*/
+
+<span id='Date-method-setDate'>/**
+</span> * @method setDate
+ * Sets the day of the month (1-31) for a specified date according to local time.
+ *
+ * If the parameter you specify is outside of the expected range, `setDate` attempts to update the
+ * date information in the `Date` object accordingly. For example, if you use 0 for `dayValue`, the
+ * date will be set to the last day of the previous month.
+ *
+ * The second statement below changes the day for theBigDay to July 24 from its original value.
+ *
+ *     theBigDay = new Date(&quot;July 27, 1962 23:30:00&quot;)
+ *     theBigDay.setDate(24)
+ *
+ * @param {Number} dayValue An integer from 1 to 31, representing the day of the month.
+ * @return {Number} New date represented as milliseconds.
+*/
+
+<span id='Date-method-setFullYear'>/**
+</span> * @method setFullYear
+ * Sets the full year (4 digits for 4-digit years) for a specified date according to
+ * local time.
+ *
+ * If you do not specify the `monthValue` and `dayValue` parameters, the values returned from the
+ * `getMonth` and `getDate` methods are used.
+ *
+ * If a parameter you specify is outside of the expected range, `setFullYear` attempts to update the
+ * other parameters and the date information in the `Date` object accordingly. For example, if you
+ * specify 15 for monthValue, the year is incremented by 1 (year + 1), and 3 is used for the month.
+ *
+ * theBigDay = new Date();
+ * theBigDay.setFullYear(1997);
+ *
+ * @param {Number} yearValue An integer specifying the numeric value of the year, for example, 1995.
+ * @param {Number} monthValue An integer between 0 and 11 representing the months January through
+ * December.
+ * @param {Number} dayValue An integer between 1 and 31 representing the day of the month. If you
+ * specify the `dayValue` parameter, you must also specify the `monthValue`.
+ * @return {Number} New date represented as milliseconds.
+ */
+
+<span id='Date-method-setHours'>/**
+</span> * @method setHours
+ * Sets the hours (0-23) for a specified date according to local time.
+ *
+ * If you do not specify the `minutesValue`, `secondsValue`, and `msValue` parameters, the values
+ * returned from the `getUTCMinutes`, `getUTCSeconds`, and `getMilliseconds` methods are used.
+ *
+ * If a parameter you specify is outside of the expected range, setHours attempts to update the date
+ * information in the `Date` object accordingly. For example, if you use 100 for `secondsValue`, the
+ * minutes will be incremented by 1 (min + 1), and 40 will be used for seconds.
+ *
+ *     theBigDay.setHours(7)
+ *
+ * @param {Number} hoursValue An integer between 0 and 23, representing the hour.
+ * @param {Number} minutesValue An integer between 0 and 59, representing the minutes.
+ * @param {Number} secondsValue An integer between 0 and 59, representing the seconds. If you specify the
+ * `secondsValue` parameter, you must also specify the `minutesValue`.
+ * @param {Number} msValue A number between 0 and 999, representing the milliseconds. If you specify the
+ * `msValue` parameter, you must also specify the `minutesValue` and `secondsValue`.
+ * @return {Number} New date represented as milliseconds.
+ */
+
+<span id='Date-method-setMilliseconds'>/**
+</span> * @method setMilliseconds
+ * Sets the milliseconds (0-999) for a specified date according to local time.
+ *
+ * If you specify a number outside the expected range, the date information in the `Date` object is
+ * updated accordingly. For example, if you specify 1005, the number of seconds is incremented by 1,
+ * and 5 is used for the milliseconds.
+ *
+ *     theBigDay = new Date();
+ *     theBigDay.setMilliseconds(100);
+ *
+ * @param {Number} millisecondsValue A number between 0 and 999, representing the milliseconds.
+ * @return {Number} New date represented as milliseconds.
+ */
+
+<span id='Date-method-setMinutes'>/**
+</span> * @method setMinutes
+ * Sets the minutes (0-59) for a specified date according to local time.
+ *
+ * If you do not specify the `secondsValue` and `msValue` parameters, the values returned from
+ * `getSeconds` and `getMilliseconds` methods are used.
+ *
+ * If a parameter you specify is outside of the expected range, `setMinutes` attempts to update the
+ * date information in the `Date` object accordingly. For example, if you use 100 for `secondsValue`,
+ * the minutes (`minutesValue`) will be incremented by 1 (minutesValue + 1), and 40 will be used for
+ * seconds.
+ *
+ *     theBigDay.setMinutes(45)
+ *
+ * @param {Number} minutesValue An integer between 0 and 59, representing the minutes.
+ * @param {Number} secondsValue An integer between 0 and 59, representing the seconds. If you
+ * specify the secondsValue parameter, you must also specify the `minutesValue`.
+ * @param {Number} msValue A number between 0 and 999, representing the milliseconds. If you specify
+ * the `msValue` parameter, you must also specify the `minutesValue` and `secondsValue`.
+ * @return {Number} New date represented as milliseconds.
+ */
+
+<span id='Date-method-setMonth'>/**
+</span> * @method setMonth
+ * Sets the month (0-11) for a specified date according to local time.
+ *
+ * If you do not specify the `dayValue` parameter, the value returned from the `getDate` method is
+ * used.
+ *
+ * If a parameter you specify is outside of the expected range, `setMonth` attempts to update the date
+ * information in the `Date` object accordingly. For example, if you use 15 for `monthValue`, the year
+ * will be incremented by 1 (year + 1), and 3 will be used for month.
+ *
+ *     theBigDay.setMonth(6)
+ *
+ * @param {Number} monthValue An integer between 0 and 11 (representing the months January through
+ * December).
+ * @param {Number} dayValue An integer from 1 to 31, representing the day of the month.
+ * @return {Number} New date represented as milliseconds.
+ */
+
+<span id='Date-method-setSeconds'>/**
+</span> * @method setSeconds
+ * Sets the seconds (0-59) for a specified date according to local time.
+ *
+ * If you do not specify the `msValue` parameter, the value returned from the `getMilliseconds` method
+ * is used.
+ *
+ * If a parameter you specify is outside of the expected range, `setSeconds` attempts to update the
+ * date information in the `Date` object accordingly. For example, if you use 100 for `secondsValue`,
+ * the minutes stored in the `Date` object will be incremented by 1, and 40 will be used for seconds.
+ *
+ *     theBigDay.setSeconds(30)
+ *
+ * @param {Number} secondsValue An integer between 0 and 59.
+ * @param {Number} msValue A number between 0 and 999, representing the milliseconds. If you specify
+ * the`msValue` parameter, you must also specify the `minutesValue` and `secondsValue`.
+ * @return {Number} New date represented as milliseconds.
+ */
+
+<span id='Date-method-setTime'>/**
+</span> * @method setTime
+ * Sets the Date object to the time represented by a number of milliseconds since
+ * January 1, 1970, 00:00:00 UTC, allowing for negative numbers for times prior.
+ *
+ * Use the `setTime` method to help assign a date and time to another `Date` object.
+ *
+ *     theBigDay = new Date(&quot;July 1, 1999&quot;)
+ *     sameAsBigDay = new Date()
+ *     sameAsBigDay.setTime(theBigDay.getTime())
+ *
+ * @param {Number} timeValue An integer representing the number of milliseconds since 1 January
+ * 1970, 00:00:00 UTC.
+ * @return {Number} New date represented as milliseconds.
+ */
+
+<span id='Date-method-setUTCDate'>/**
+</span> * @method setUTCDate
+ * Sets the day of the month (1-31) for a specified date according to universal time.
+ *
+ * If a parameter you specify is outside of the expected range, `setUTCDate` attempts to update the
+ * date information in the `Date` object accordingly. For example, if you use 40 for `dayValue`, and
+ * the month stored in the `Date` object is June, the day will be changed to 10 and the month will be
+ * incremented to July.
+ *
+ *     theBigDay = new Date();
+ *     theBigDay.setUTCDate(20);
+ *
+ * @param {Number} dayValue An integer from 1 to 31, representing the day of the month.
+ * @return {Number} New date represented as milliseconds.
+ */
+
+<span id='Date-method-setUTCFullYear'>/**
+</span> * @method setUTCFullYear
+ * Sets the full year (4 digits for 4-digit years) for a specified date according
+ * to universal time.
+ *
+ * If you do not specify the `monthValue` and `dayValue` parameters, the values returned from the
+ * `getMonth` and `getDate` methods are used.
+ *
+ * If a parameter you specify is outside of the expected range, `setUTCFullYear` attempts to update
+ * the other parameters and the date information in the `Date` object accordingly. For example, if you
+ * specify 15 for `monthValue`, the year is incremented by 1 (year + 1), and 3 is used for the month.
+ *
+ *     theBigDay = new Date();
+ *     theBigDay.setUTCFullYear(1997);
+ *
+ * @param {Number} yearValue An integer specifying the numeric value of the year, for example, 1995.
+ * @param {Number} monthValue An integer between 0 and 11 representing the months January through
+ * December.
+ * @param {Number} dayValue An integer between 1 and 31 representing the day of the month. If you
+ * specify the `dayValue` parameter, you must also specify the `monthValue`.
+ * @return {Number} New date represented as milliseconds.
+ */
+
+<span id='Date-method-setUTCHours'>/**
+</span> * @method setUTCHours
+ * Sets the hour (0-23) for a specified date according to universal time.
+ *
+ * If you do not specify the `minutesValue`, `secondsValue`, and `msValue` parameters, the values
+ * returned from the `getUTCMinutes`, `getUTCSeconds`, and `getUTCMilliseconds` methods are used.
+ *
+ * If a parameter you specify is outside of the expected range, `setUTCHours` attempts to update the
+ * date information in the `Date` object accordingly. For example, if you use 100 for `secondsValue`,
+ * the minutes will be incremented by 1 (min + 1), and 40 will be used for seconds.
+ *
+ *     theBigDay = new Date();
+ *     theBigDay.setUTCHours(8);
+ *
+ * @param {Number} hoursValue An integer between 0 and 23, representing the hour.
+ * @param {Number} minutesValue An integer between 0 and 59, representing the minutes.
+ * @param {Number} secondsValue An integer between 0 and 59, representing the seconds. If you specify the
+ * `secondsValue` parameter, you must also specify the `minutesValue`.
+ * @param {Number} msValue A number between 0 and 999, representing the milliseconds. If you specify the
+ * `msValue` parameter, you must also specify the `minutesValue` and `secondsValue`.
+ * @return {Number} New date represented as milliseconds.
+ */
+
+<span id='Date-method-setUTCMilliseconds'>/**
+</span> * @method setUTCMilliseconds
+ * Sets the milliseconds (0-999) for a specified date according to universal time.
+ *
+ * If a parameter you specify is outside of the expected range, `setUTCMilliseconds` attempts to
+ * update the date information in the `Date` object accordingly. For example, if you use 1100 for
+ * `millisecondsValue`, the seconds stored in the Date object will be incremented by 1, and 100 will
+ * be used for milliseconds.
+ *
+ *     theBigDay = new Date();
+ *     theBigDay.setUTCMilliseconds(500);
+ *
+ * @param {Number} millisecondsValue A number between 0 and 999, representing the milliseconds.
+ * @return {Number} New date represented as milliseconds.
+ */
+
+<span id='Date-method-setUTCMinutes'>/**
+</span> * @method setUTCMinutes
+ * Sets the minutes (0-59) for a specified date according to universal time.
+ *
+ * If you do not specify the `secondsValue` and `msValue` parameters, the values returned from
+ * `getUTCSeconds` and `getUTCMilliseconds` methods are used.
+ *
+ * If a parameter you specify is outside of the expected range, `setUTCMinutes` attempts to update the
+ * date information in the `Date` object accordingly. For example, if you use 100 for `secondsValue`,
+ * the minutes (`minutesValue`) will be incremented by 1 (`minutesValue` + 1), and 40 will be used for
+ * seconds.
+ *
+ *     theBigDay = new Date();
+ *     theBigDay.setUTCMinutes(43);
+ *
+ * @param {Number} minutesValue An integer between 0 and 59, representing the minutes.
+ * @param {Number} secondsValue An integer between 0 and 59, representing the seconds. If you specify the `secondsValue` parameter, you must also specify the `minutesValue`.
+ * @param {Number} msValue A number between 0 and 999, representing the milliseconds. If you specify the `msValue` parameter, you must also specify the `minutesValue` and `secondsValue`.
+ * @return {Number} New date represented as milliseconds.
+ */
+
+<span id='Date-method-setUTCMonth'>/**
+</span> * @method setUTCMonth
+ * Sets the month (0-11) for a specified date according to universal time.
+ *
+ * If you do not specify the `dayValue` parameter, the value returned from the `getUTCDate` method is
+ * used.
+ *
+ * If a parameter you specify is outside of the expected range, `setUTCMonth` attempts to update the
+ * date information in the `Date` object accordingly. For example, if you use 15 for `monthValue`, the
+ * year will be incremented by 1 (year + 1), and 3 will be used for month.
+ *
+ *     theBigDay = new Date();
+ *     theBigDay.setUTCMonth(11);
+ *
+ * @param {Number} monthValue An integer between 0 and 11, representing the months January through
+ * December.
+ * @param {Number} dayValue An integer from 1 to 31, representing the day of the month.
+ * @return {Number} New date represented as milliseconds.
+ */
+
+<span id='Date-method-setUTCSeconds'>/**
+</span> * @method setUTCSeconds
+ * Sets the seconds (0-59) for a specified date according to universal time.
+ *
+ * If you do not specify the `msValue` parameter, the value returned from the `getUTCMilliseconds`
+ * methods is used.
+ *
+ * If a parameter you specify is outside of the expected range, `setUTCSeconds` attempts to update the
+ * date information in the `Date` object accordingly. For example, if you use 100 for `secondsValue`,
+ * the minutes stored in the `Date` object will be incremented by 1, and 40 will be used for seconds.
+ *
+ *     theBigDay = new Date();
+ *     theBigDay.setUTCSeconds(20);
+ *
+ * @param {Number} secondsValue An integer between 0 and 59.
+ * @param {Number} msValue A number between 0 and 999, representing the milliseconds.
+ * @return {Number} New date represented as milliseconds.
+ */
+
+<span id='Date-method-toDateString'>/**
+</span> * @method toDateString
+ * Returns the &quot;date&quot; portion of the Date as a human-readable string in American English.
+ *
+ * {@link Date} instances refer to a specific point in time. Calling `toString` will return the
+ * date formatted in a human readable form in American English. In SpiderMonkey, this consists of the
+ * date portion (day, month, and year) followed by the time portion (hours, minutes, seconds, and time
+ * zone). Sometimes it is desirable to obtain a string of the date portion; such a thing can be
+ * accomplished with the `toDateString` method.
+ *
+ * The `toDateString` method is especially useful because compliant engines implementing ECMA-262 may
+ * differ in the string obtained from `toString` for `Date` objects, as the format is implementation-
+ * dependent and simple string slicing approaches may not produce consistent results across multiple
+ * engines.
+ *
+ *     var d = new Date(1993, 6, 28, 14, 39, 7);
+ *     println(d.toString()); // prints Wed Jul 28 1993 14:39:07 GMT-0600 (PDT)
+ *     println(d.toDateString()); // prints Wed Jul 28 1993
+ *
+ * @return {String} Human-readable string, in local time.
+ */
+
+<span id='Date-method-toLocaleDateString'>/**
+</span> * @method toLocaleDateString
+ * Returns the &quot;date&quot; portion of the Date as a string, using the current locale's
+ * conventions.
+ *
+ * The `toLocaleDateString` method relies on the underlying operating system in formatting dates. It
+ * converts the date to a string using the formatting convention of the operating system where the
+ * script is running. For example, in the United States, the month appears before the date (04/15/98),
+ * whereas in Germany the date appears before the month (15.04.98). If the operating system is not
+ * year-2000 compliant and does not use the full year for years before 1900 or over 2000,
+ * `toLocaleDateString` returns a string that is not year-2000 compliant. `toLocaleDateString` behaves
+ * similarly to `toString` when converting a year that the operating system does not properly format.
+ *
+ * Methods such as `getDate`, `getMonth`, and `getFullYear` give more portable results than
+ * `toLocaleDateString`. Use `toLocaleDateString` when the intent is to display to the user a string
+ * formatted using the regional format chosen by the user. Be aware that this method, due to its
+ * nature, behaves differently depending on the operating system and on the user's settings.
+ *
+ * In the following example, `today` is a `Date` object:
+ *
+ *     today = new Date(95,11,18,17,28,35) //months are represented by 0 to 11
+ *     today.toLocaleDateString()
+ *
+ * In this example, `toLocaleDateString` returns a string value that is similar to the following form.
+ * The exact format depends on the platform, locale and user's settings.
+ *
+ *     12/18/95
+ *
+ * You shouldn't use this method in contexts where you rely on a particular format or locale.
+ *
+ *     &quot;Last visit: &quot; + someDate.toLocaleDateString(); // Good example
+ *     &quot;Last visit was at &quot; + someDate.toLocaleDateString(); // Bad example
+ *
+ * @return {String} Human-readable string that may be formatted differently depending
+ * on the country.
+ */
+
+<span id='Date-method-toLocaleString'>/**
+</span> * @method toLocaleString
+ * Converts a date to a string, using the current locale's conventions. Overrides
+ * the `Object.toLocaleString` method.
+ *
+ * The `toLocaleString` method relies on the underlying operating system in formatting dates. It
+ * converts the date to a string using the formatting convention of the operating system where the
+ * script is running. For example, in the United States, the month appears before the date (04/15/98),
+ * whereas in Germany the date appears before the month (15.04.98). If the operating system is not
+ * year-2000 compliant and does not use the full year for years before 1900 or over 2000,
+ * `toLocaleString` returns a string that is not year-2000 compliant. `toLocaleString` behaves
+ * similarly to `toString` when converting a year that the operating system does not properly format.
+ *
+ * Methods such as `getDate`, `getMonth`, `getFullYear`, `getHours`, `getMinutes`, and `getSeconds`
+ * give more portable results than `toLocaleString`. Use `toLocaleString` when the intent is to
+ * display to the user a string formatted using the regional format chosen by the user. Be aware that
+ * this method, due to its nature, behaves differently depending on the operating system and on the
+ * user's settings.
+ *
+ * In the following example, `today` is a `Date` object:
+ *
+ *     today = new Date(95,11,18,17,28,35); //months are represented by 0 to 11
+ *     today.toLocaleString();
+ *
+ * In this example, `toLocaleString` returns a string value that is similar to the following form. The
+ * exact format depends on the platform, locale and user's settings.
+ *
+ *     12/18/95 17:28:35
+ *
+ * You shouldn't use this method in contexts where you rely on a particular format or locale.
+ *
+ *     &quot;Last visit: &quot; + someDate.toLocaleString(); // Good example
+ *     &quot;Last visit was at &quot; + someDate.toLocaleString(); // Bad example
+ *
+ * @return {String} Human-readable string that may be formatted differently depending
+ * on the country.
+ */
+
+<span id='Date-method-toLocaleTimeString'>/**
+</span> * @method toLocaleTimeString
+ * Returns the &quot;time&quot; portion of the Date as a string, using the current locale's
+ * conventions.
+ *
+ * The `toLocaleTimeString` method relies on the underlying operating system in formatting dates. It
+ * converts the date to a string using the formatting convention of the operating system where the
+ * script is running. For example, in the United States, the month appears before the date (04/15/98),
+ * whereas in Germany the date appears before the month (15.04.98).
+ *
+ * Methods such as `getHours`, `getMinutes`, and `getSeconds` give more consistent results than
+ * `toLocaleTimeString`. Use `toLocaleTimeString` when the intent is to display to the user a string
+ * formatted using the regional format chosen by the user. Be aware that this method, due to its
+ * nature, behaves differently depending on the operating system and on the user's settings.
+ *
+ * In the following example, `today` is a `Date` object:
+ *
+ *     today = new Date(95,11,18,17,28,35) //months are represented by 0 to 11
+ *     today.toLocaleTimeString()
+ *
+ * In this example, `toLocaleTimeString` returns a string value that is similar to the following form.
+ * The exact format depends on the platform.
+ *
+ *     17:28:35
+ *
+ * You shouldn't use this method in contexts where you rely on a particular format or locale.
+ *
+ *     &quot;Last visit: &quot; + someDate.toLocaleTimeString(); // Good example
+ *     &quot;Last visit was at &quot; + someDate.toLocaleTimeString(); // Bad example
+ *
+ * @return {String} Human-readable string that may be formatted differently depending
+ * on the country.
+ */
+
+<span id='Date-method-toString'>/**
+</span> * @method toString
+ * Returns a string representing the specified Date object. Overrides the
+ * `Object.prototype.toString` method.
+ *
+ * The `Date` object overrides the toString method of the Object object; it does not inherit
+ * `Object.toString`. For `Date` objects, the `toString` method returns a string representation of the
+ * object.
+ *
+ * `toString` always returns a string representation of the date in American English.
+ *
+ * JavaScript calls the `toString` method automatically when a date is to be represented as a text
+ * value or when a date is referred to in a string concatenation.
+ *
+ * The following assigns the `toString` value of a `Date` object to `myVar`:
+ *
+ *     x = new Date();
+ *     myVar=x.toString();   //assigns a value to myVar similar to:
+ *     //Mon Sep 28 1998 14:36:22 GMT-0700 (Pacific Daylight Time)
+ *
+ * @return {String} Human-readable string of the date in local time.
+ */
+
+<span id='Date-method-toTimeString'>/**
+</span> * @method toTimeString
+ * Returns the &quot;time&quot; portion of the Date as a human-readable string.
+ *
+ * {@link Date} instances refer to a specific point in time. Calling `toString` will return the
+ * date formatted in a human readable form in American English. In SpiderMonkey, this consists of the
+ * date portion (day, month, and year) followed by the time portion (hours, minutes, seconds, and
+ * time zone). Sometimes it is desirable to obtain a string of the time portion; such a thing can be
+ * accomplished with the `toTimeString` method.
+ *
+ * The `toTimeString` method is especially useful because compliant engines implementing ECMA-262 may
+ * differ in the string obtained from `toString` for `Date` objects, as the format is implementation-
+ * dependent; simple string slicing approaches may not produce consistent results across multiple
+ * engines.
+ *
+ *     var d = new Date(1993, 6, 28, 14, 39, 7);
+ *     println(d.toString()); // prints Wed Jul 28 1993 14:39:07 GMT-0600 (PDT)
+ *     println(d.toTimeString()); // prints 14:39:07 GMT-0600 (PDT)
+ *
+ * @return {String} Human-readable string of the date in local time.
+ */
+
+<span id='Date-method-toUTCString'>/**
+</span> * @method toUTCString
+ * Converts a date to a string, using the universal time convention.
+ *
+ * The value returned by `toUTCString` is a readable string in American English in the UTC time zone.
+ * The format of the return value may vary according to the platform.
+ *
+ *     var today = new Date();
+ *     var UTCstring = today.toUTCString();
+ *     // Mon, 03 Jul 2006 21:44:38 GMT
+ *
+ * @return {String} String of the date in UTC.
+ */
 
-<span id='Ext-form-field-Date-cfg-grow'>    /**
-</span>     * @cfg {Boolean} grow @hide
-     */
-<span id='Ext-form-field-Date-cfg-growMin'>    /**
-</span>     * @cfg {Number} growMin @hide
-     */
-<span id='Ext-form-field-Date-cfg-growMax'>    /**
-</span>     * @cfg {Number} growMax @hide
-     */
-<span id='Ext-form-field-Date-method-autoSize'>    /**
-</span>     * @hide
-     * @method autoSize
-     */
-});
-</pre>
+<span id='Date-method-valueOf'>/**
+</span> * @method valueOf
+ * Returns the primitive value of a Date object. Overrides the
+ * Object.prototype.valueOf method.
+ *
+ * The `valueOf` method returns the primitive value of a `Date` object as a number data type, the
+ * number of milliseconds since midnight 01 January, 1970 UTC.
+ *
+ * This method is functionally equivalent to the `getTime` method.
+ *
+ * This method is usually called internally by JavaScript and not explicitly in code.
+ *
+ *     x = new Date(56, 6, 17);
+ *     myVar = x.valueOf();      //assigns -424713600000 to myVar
+ *
+ * @return {Number} Date represented as milliseconds.
+ */</pre>
 </body>
 </html>