Today it's 06/11/2012. I need retrieve the last day of the current year using javascript.
function getLastDayOfYear(date)
{
var x = document.getElementById("demo");
var year = date.getFullYear();
var month = date.getMonth();
var day = 0; // ?????
x.innerHTML = day + "-" + month + "-" + year;
}
Is there any function that retrieve it done, or must i do a full implementation? If i need to implement this, could anyone help me out ?
I made a simple fiddle you can check here: http://jsfiddle.net/EyzCD/