From f83d317407acbd71b871027f16be6b2136983fe8 Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 21 May 2012 21:24:06 +0200 Subject: [PATCH] minor changes --- source/Ox/js/Date.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/Ox/js/Date.js b/source/Ox/js/Date.js index 7edddafb..70c246c0 100644 --- a/source/Ox/js/Date.js +++ b/source/Ox/js/Date.js @@ -50,12 +50,11 @@ Ox.getDayOfTheYear Get the day of the year for a given date > Ox.getDayOfTheYear(new Date("12/31/2004")) 366 @*/ - Ox.getDayOfTheYear = function(date, utc) { date = Ox.makeDate(date); var month = Ox.getMonth(date, utc), year = Ox.getFullYear(date, utc); - return Ox.sum(Ox.map(Ox.range(month), function(i) { + return Ox.sum(Ox.range(month).map(function(i) { return Ox.getDaysInMonth(year, i + 1); })) + Ox.getDate(date, utc); }; @@ -69,7 +68,7 @@ Ox.getDaysInMonth Get the number of days in a given month > Ox.getDaysInMonth(new Date('01/01/2004'), "February") 29 @*/ -Ox.getDaysInMonth = function(year, month, utc) { +Ox.getDaysInMonth = function(year, month) { year = Ox.makeYear(year); month = Ox.isNumber(month) ? month : Ox.map(Ox.MONTHS, function(v, i) {