Node.js examples for Date:Day
Returns the numeric representation of the day of the year.
/*/*from w ww.j a va2 s . c o m*/ Returns the numeric representation of the day of the year. Source: http://javascript.about.com/library/bldayyear.htm */ Date.prototype.getDayOfTheYear = function() { var onejan = new Date(this.getFullYear(),0,1); return Math.ceil((this - onejan) / 86400000); }