From 0f8c1042ad5985e2abb36ea6909d745bb14e4bb3 Mon Sep 17 00:00:00 2001 From: James Holland Date: Fri, 4 Apr 2014 16:14:25 -0600 Subject: [PATCH] Fixed the getDayOfYear function to start at 1 instead of 0. --- date-functions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/date-functions.js b/date-functions.js index 7915e29..611ed08 100644 --- a/date-functions.js +++ b/date-functions.js @@ -304,7 +304,7 @@ Date.prototype.getDayOfYear = function () { for (var i = 0; i < this.getMonth(); ++i) { num += Date.daysInMonth[i] } - return num + this.getDate() - 1 + return num + this.getDate() }; Date.prototype.getWeekOfYear = function () { var now = this.getDayOfYear() + (4 - this.getDay()); @@ -388,4 +388,4 @@ Date.patterns = { SortableDateTimePattern: "Y-m-d\\TH:i:s", UniversalSortableDateTimePattern: "Y-m-d H:i:sO", YearMonthPattern: "F, Y" -}; \ No newline at end of file +};