dustin@782: dustin@782: // A new Prototype to return the Day of the Year. dustin@782: // Taken from: http://javascript.about.com/library/bldayyear.htm dustin@782: Date.prototype.getDOY = function() { dustin@782: var onejan = new Date(this.getFullYear(),0,1); dustin@782: return Math.ceil((this - onejan) / 86400000); dustin@782: }