Browse files

Merge pull request #19 from felixge/issue15

Fix issue 15: "Week calculation is wrong ... includes decimals"
  • Loading branch information...
2 parents d0a752c + 84f29cb commit 844a98922d476ad08bbc0b2899af595b69ac3ccd @coffbr01 coffbr01 committed Dec 14, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/dateformat.js
View
2 lib/dateformat.js
@@ -46,7 +46,7 @@ var dateFormat = function () {
// Number of weeks between target Thursday and first Thursday
var weekDiff = (targetThursday - firstThursday) / (86400000*7);
- return 1 + weekDiff;
+ return 1 + Math.floor(weekDiff);
},
/**

0 comments on commit 844a989

Please sign in to comment.