X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775:/docs/source/Date.html diff --git a/docs/source/Date.html b/docs/source/Date.html index cc9eaddc..f8717489 100644 --- a/docs/source/Date.html +++ b/docs/source/Date.html @@ -1,11 +1,17 @@ - - - The source code - - - - -
/** + + + The source code + + + + +
/*!
+ * Ext JS Library 3.0.3
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
/** * @class Date * * The date parsing and formatting syntax contains a subset of @@ -795,15 +801,15 @@ dt = Date.parseDate("2006-02-29 03:20:01", "Y-m-d H:i:s", true); // returns null a: { g:1, c:"if (results[{0}] == 'am') {\n" - + "if (h == 12) { h = 0; }\n" - + "} else { if (h < 12) { h += 12; }}", + + "if (!h || h == 12) { h = 0; }\n" + + "} else { if (!h || h < 12) { h = (h || 0) + 12; }}", s:"(am|pm)" }, A: { g:1, c:"if (results[{0}] == 'AM') {\n" - + "if (h == 12) { h = 0; }\n" - + "} else { if (h < 12) { h += 12; }}", + + "if (!h || h == 12) { h = 0; }\n" + + "} else { if (!h || h < 12) { h = (h || 0) + 12; }}", s:"(AM|PM)" }, g: function() { @@ -979,12 +985,12 @@ Ext.apply(Date.prototype, { * @return {Number} 0 to 364 (365 in leap years). */ getDayOfYear: function() { - var i = 0, - num = 0, + var num = 0, d = this.clone(), - m = this.getMonth(); + m = this.getMonth(), + i; - for (i = 0, d.setMonth(0); i < m; d.setMonth(++i)) { + for (i = 0, d.setDate(1), d.setMonth(0); i < m; d.setMonth(++i)) { num += d.getDaysInMonth(); } return num + this.getDate() - 1; @@ -1315,6 +1321,6 @@ console.group('ISO-8601 Granularity Test (see http://www.w3.org/TR/NOTE-datetime console.log('Date.parseDate("1997-13-16T19:20:30.45+01:00", "c", true)= %o', Date.parseDate("1997-13-16T19:20:30.45+01:00", "c", true)); // strict date parsing with invalid month value console.groupEnd(); -//*/
- +//*/
+ \ No newline at end of file