Today is 11/06/2012. I need to get 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 retrieves it, or should I complete the full implementation? If I need to implement this, can someone help me?
I made a simple fiddle that you can check here: http://jsfiddle.net/EyzCD/
javascript datetime
glhrmbhnrt
source share