Mercurial > lada > lada-client
view resources/lib/Date.prototype.getDOY.js @ 788:a4c358d08a0d
moved doctype declaration to the beginning of the file. Else IE9 will try to display the page in QUIRKS mode and it won't work.
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Wed, 13 May 2015 10:47:48 +0200 |
parents | a0cfe2395e0a |
children |
line wrap: on
line source
// A new Prototype to return the Day of the Year. // Taken from: http://javascript.about.com/library/bldayyear.htm Date.prototype.getDOY = function() { var onejan = new Date(this.getFullYear(),0,1); return Math.ceil((this - onejan) / 86400000); }