minor changes

This commit is contained in:
rolux 2012-05-21 21:24:06 +02:00
parent 344d7ec40d
commit f83d317407

View file

@ -50,12 +50,11 @@ Ox.getDayOfTheYear <f> 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 <f> 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) {