From 426a17e08a8081708758f653af69f472ca92dba7 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Sun, 27 Nov 2011 22:56:42 +0800 Subject: [PATCH] sync fixes --- Date.js | 84 ++++---- JSDOC/BuildDocs.js | 75 ++++--- JSDOC/Collapse.js | 10 +- JSDOC/CompressWhite.js | 14 +- JSDOC/DocComment.js | 51 +++++ JSDOC/DocTag.js | 3 + JSDOC/Identifier.js | 7 +- JSDOC/Lang.js | 6 +- JSDOC/Options.js | 11 +- JSDOC/PrettyPrint.js | 4 +- JSDOC/ScopeNamer.js | 221 ++++++++++++++++++-- JSDOC/ScopeParser.js | 7 +- JSDOC/Symbol.js | 17 +- JSDOC/SymbolSet.js | 105 ++++++---- JSDOC/Token.js | 41 +++- JSDOC/TokenReader.js | 2 +- examples/jsdoc_templates/class.html | 29 ++- examples/jsdoc_templates/static/default.css | 10 +- 18 files changed, 513 insertions(+), 184 deletions(-) diff --git a/Date.js b/Date.js index 1653823..78da992 100644 --- a/Date.js +++ b/Date.js @@ -662,7 +662,8 @@ XObject.extend(Date.prototype, * Get the number of days in the current month, adjusted for leap year. * @return {Number} The number of days in the month */ - getDaysInMonth : function() { + getDaysInMonth : function() + { Date.daysInMonth[1] = this.isLeapYear() ? 29 : 28; return Date.daysInMonth[this.getMonth()]; }, @@ -671,7 +672,8 @@ XObject.extend(Date.prototype, * Get the English ordinal suffix of the current day (equivalent to the format specifier 'S'). * @return {String} 'st, 'nd', 'rd' or 'th' */ - getSuffix : function() { + getSuffix : function() + { switch (this.getDate()) { case 1: case 21: @@ -711,7 +713,8 @@ XObject.extend(Date.prototype, * @return {Date} The new Date instance */ - clone : function() { + clone : function() + { return new Date(this.getTime()); }, @@ -720,7 +723,8 @@ XObject.extend(Date.prototype, @param {Boolean} clone true to create a clone of this date, clear the time and return it @return {Date} this or the clone */ - clearTime : function(clone){ + clearTime : function(clone) + { if(clone){ return this.clone().clearTime(); } @@ -755,38 +759,46 @@ XObject.extend(Date.prototype, * @param {Number} value The amount to add to the current date * @return {Date} The new Date instance */ - add : function(interval, value){ - var d = this.clone(); - if (!interval || value === 0) return d; - switch(interval.toLowerCase()){ - case Date.MILLI: - d.setMilliseconds(this.getMilliseconds() + value); - break; - case Date.SECOND: - d.setSeconds(this.getSeconds() + value); - break; - case Date.MINUTE: - d.setMinutes(this.getMinutes() + value); - break; - case Date.HOUR: - d.setHours(this.getHours() + value); - break; - case Date.DAY: - d.setDate(this.getDate() + value); - break; - case Date.MONTH: - var day = this.getDate(); - if(day > 28){ - day = Math.min(day, this.getFirstDateOfMonth().add('mo', value).getLastDateOfMonth().getDate()); - } - d.setDate(day); - d.setMonth(this.getMonth() + value); - break; - case Date.YEAR: - d.setFullYear(this.getFullYear() + value); - break; - } - return d; + add : function(interval, value) + { + var d = this.clone(); + if (!interval || value === 0) return d; + switch(interval.toLowerCase()){ + case Date.MILLI: + d.setMilliseconds(this.getMilliseconds() + value); + break; + + case Date.SECOND: + d.setSeconds(this.getSeconds() + value); + break; + + case Date.MINUTE: + d.setMinutes(this.getMinutes() + value); + break; + + case Date.HOUR: + d.setHours(this.getHours() + value); + break; + + case Date.DAY: + d.setDate(this.getDate() + value); + break; + + case Date.MONTH: + var day = this.getDate(); + if(day > 28){ + day = Math.min(day, this.getFirstDateOfMonth().add('mo', value).getLastDateOfMonth().getDate()); + } + d.setDate(day); + d.setMonth(this.getMonth() + value); + break; + + case Date.YEAR: + d.setFullYear(this.getFullYear() + value); + break; + + } + return d; } }); \ No newline at end of file diff --git a/JSDOC/BuildDocs.js b/JSDOC/BuildDocs.js index 90c820c..a4f6bcf 100644 --- a/JSDOC/BuildDocs.js +++ b/JSDOC/BuildDocs.js @@ -1,9 +1,21 @@ -//