-<!DOCTYPE html><html><head><title>Sencha Documentation Project</title><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../prettify.css" type="text/css"><link rel="stylesheet" href="../prettify_sa.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script></head><body onload="prettyPrint()"><pre class="prettyprint"><pre><span id='Ext-Date'>/**
+<!DOCTYPE html>
+<html>
+<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>
+ <style type="text/css">
+ .highlight { display: block; background-color: #ddd; }
+ </style>
+ <script type="text/javascript">
+ function highlight() {
+ document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
+ }
+ </script>
+</head>
+<body onload="prettyPrint(); highlight();">
+ <pre class="prettyprint lang-js"><span id='Ext-Date'>/**
</span> * @class Ext.Date
* A set of useful static methods to deal with date
* Note that if Ext.Date is required and loaded, it will copy all methods / properties to
}
Ext.Date = {
-<span id='Ext-Date-property-now'> /**
+<span id='Ext-Date-method-now'> /**
</span> * Returns the current timestamp
* @return {Date} The current timestamp
+ * @method
*/
now: Date.now || function() {
return +new Date();
Dec:11
},
<span id='Ext-Date-property-defaultFormat'> /**
-</span> * <p>The date format string that the {@link #dateRenderer} and {@link #date} functions use.
- * see {@link #Date} for details.</p>
+</span> * <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
return utilDate.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
},
-<span id='Ext-Date-property-formatContainsHourInfo'> /**
+<span id='Ext-Date-method-formatContainsHourInfo'> /**
</span> * 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(){
var stripEscapeRe = /(\\.)/g,
};
})(),
-<span id='Ext-Date-property-formatContainsDateInfo'> /**
+<span id='Ext-Date-method-formatContainsDateInfo'> /**
</span> * Checks if the specified format contains information about
* anything other than the time.
* @param {String} format The format to check
* @return {Boolean} True if the format contains information about
* date/day information.
* @static
+ * @method
*/
formatContainsDateInfo : (function(){
var stripEscapeRe = /(\\.)/g,
+ "y = ty > Ext.Date.y2kYear ? 1900 + ty : 2000 + ty;\n", // 2-digit year
s:"(\\d{1,2})"
},
-<span id='Ext-Date-property-a'> /**
-</span> * In the am/pm parsing routines, we allow both upper and lower case
+ /*
+ * In the am/pm parsing routines, we allow both upper and lower case
* even though it doesn't exactly match the spec. It gives much more flexibility
* in being able to specify case insensitive regexes.
*/
return num + date.getDate() - 1;
},
-<span id='Ext-Date-property-getWeekOfYear'> /**
+<span id='Ext-Date-method-getWeekOfYear'> /**
</span> * Get the numeric ISO-8601 week number of the year.
* (equivalent to the format specifier 'W', but without a leading zero).
* @param {Date} date The date
* @return {Number} 1 to 53
+ * @method
*/
getWeekOfYear : (function() {
// adapted from http://www.merlyn.demon.co.uk/weekcalc.htm
return new Date(date.getFullYear(), date.getMonth(), utilDate.getDaysInMonth(date));
},
-<span id='Ext-Date-property-getDaysInMonth'> /**
+<span id='Ext-Date-method-getDaysInMonth'> /**
</span> * Get the number of days in the current month, adjusted for leap year.
* @param {Date} date The date
* @return {Number} The number of days in the month.
+ * @method
*/
getDaysInMonth: (function() {
var daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
var utilDate = Ext.Date;
})();
-</pre></pre></body></html>
\ No newline at end of file
+</pre>
+</body>
+</html>