[Pkg-javascript-commits] [dojo] 05/09: Fixes really old regression in add weekday routine. Thanks, Bryan for catching this. Refs #5053

David Prévot taffit at moszumanska.debian.org
Mon May 11 20:11:36 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag 1.0.0rc3
in repository dojo.

commit 23ac94894a45c2589582e432aeda5fe9472c6311
Author: Adam Peller <github at peller.org>
Date:   Mon Nov 12 03:52:46 2007 +0000

    Fixes really old regression in add weekday routine.  Thanks, Bryan for catching this.  Refs #5053
    
    git-svn-id: http://svn.dojotoolkit.org/src/branches/1.0/dojo/trunk@11484 560b804f-0ae3-0310-86f3-f6aa0a117693
---
 date.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/date.js b/date.js
index 9366a96..772e12e 100644
--- a/date.js
+++ b/date.js
@@ -126,7 +126,6 @@ dojo.date.add = function(/*Date*/date, /*String*/interval, /*int*/amount){
 			break;
 		case "weekday":
 			//i18n FIXME: assumes Saturday/Sunday weekend, but even this is not standard.  There are CLDR entries to localize this.
-			var dayOfMonth = date.getDate();
 			var days, weeks;
 			var adj = 0;
 			// Divide the increment time span into weekspans plus leftover days
@@ -160,7 +159,7 @@ dojo.date.add = function(/*Date*/date, /*String*/interval, /*int*/amount){
 			}
 			// Increment by number of weeks plus leftover days plus
 			// weekend adjustments
-			amount = dayOfMonth + 7 * weeks + days + adj;
+			amount = 7 * weeks + days + adj;
 			break;
 		case "year":
 			property = "FullYear";

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git



More information about the Pkg-javascript-commits mailing list