* default behaviour of javascript Date objects.
* (see {@link #parse} for more information)
* Defaults to <tt>false</tt>.
- * @static
* @type Boolean
*/
useStrict: false,
* <p>To enable Dates to also be <i>formatted</i> according to that format, a corresponding
* formatting function must be placed into the {@link #formatFunctions} property.
* @property parseFunctions
- * @static
* @type Object
*/
parseFunctions: {
* <p>To enable date strings to also be <i>parsed</i> according to that format, a corresponding
* parsing function must be placed into the {@link #parseFunctions} property.
* @property formatFunctions
- * @static
* @type Object
*/
formatFunctions: {
/**
* Date interval constant
- * @static
* @type String
*/
MILLI : "ms",
/**
* Date interval constant
- * @static
* @type String
*/
SECOND : "s",
/**
* Date interval constant
- * @static
* @type String
*/
MINUTE : "mi",
/** Date interval constant
- * @static
* @type String
*/
HOUR : "h",
/**
* Date interval constant
- * @static
* @type String
*/
DAY : "d",
/**
* Date interval constant
- * @static
* @type String
*/
MONTH : "mo",
/**
* Date interval constant
- * @static
* @type String
*/
YEAR : "y",
Ext.Date.parse('2009-02', 'Y-m'); // returns a Date object representing February 1st 2009
</code></pre>
* @property defaults
- * @static
* @type Object
*/
defaults: {},
/**
+ * @property {String[]} dayNames
* An array of textual day names.
* Override these values for international dates.
* Example:
...
];
</code></pre>
- * @type Array
- * @static
*/
dayNames : [
"Sunday",
],
/**
+ * @property {String[]} monthNames
* An array of textual month names.
* Override these values for international dates.
* Example:
...
];
</code></pre>
- * @type Array
- * @static
*/
monthNames : [
"January",
],
/**
+ * @property {Object} monthNumbers
* An object hash of zero-based javascript month numbers (with short month names as keys. note: keys are case-sensitive).
* Override these values for international dates.
* Example:
...
};
</code></pre>
- * @type Object
- * @static
*/
monthNumbers : {
Jan:0,
Dec:11
},
/**
+ * @property {String} defaultFormat
* <p>The date format string that the {@link Ext.util.Format#dateRenderer}
* and {@link Ext.util.Format#date} functions use. See {@link Ext.Date} for details.</p>
- * <p>This defaults to <code>m/d/Y</code>, but may be overridden in a locale file.</p>
- * @property defaultFormat
- * @static
- * @type String
+ * <p>This may be overridden in a locale file.</p>
*/
defaultFormat : "m/d/Y",
/**
* Override this function for international dates.
* @param {Number} month A zero-based javascript month number.
* @return {String} The short month name.
- * @static
*/
getShortMonthName : function(month) {
return utilDate.monthNames[month].substring(0, 3);
* Override this function for international dates.
* @param {Number} day A zero-based javascript day number.
* @return {String} The short day name.
- * @static
*/
getShortDayName : function(day) {
return utilDate.dayNames[day].substring(0, 3);
* Override this function for international dates.
* @param {String} name The short/full month name.
* @return {Number} The zero-based javascript month number.
- * @static
*/
getMonthNumber : function(name) {
// handle camel casing for english month names (since the keys for the Ext.Date.monthNumbers hash are case sensitive)
* Checks if the specified format contains hour information
* @param {String} format The format to check
* @return {Boolean} True if the format contains hour information
- * @static
* @method
*/
formatContainsHourInfo : (function(){
* @param {String} format The format to check
* @return {Boolean} True if the format contains information about
* date/day information.
- * @static
* @method
*/
formatContainsDateInfo : (function(){
console.log(Ext.Date.format(new Date(), 'X'); // returns the current day of the month
</code></pre>
* @type Object
- * @static
*/
formatCodes : {
d: "Ext.String.leftPad(this.getDate(), 2, '0')",
* @param {Number} second (optional) Second
* @param {Number} millisecond (optional) Millisecond
* @return {Boolean} true if the passed parameters do not cause a Date "rollover", false otherwise.
- * @static
*/
isValid : function(y, m, d, h, i, s, ms) {
// setup defaults
* @param {Boolean} strict (optional) True to validate date strings while parsing (i.e. prevents javascript Date "rollover")
(defaults to false). Invalid date strings will return null when parsed.
* @return {Date} The parsed Date.
- * @static
*/
parse : function(input, format, strict) {
var p = utilDate.parseFunctions;