In Javascript, how do I get the number of weeks in a month? I can\'t seem to find code for this anywhere.
I need this to be able to know how many rows I need for a g
This works for me,
function(d){ var firstDay = new Date(this.getFullYear(), this.getMonth(), 1).getDay(); return Math.ceil((d.getDate() + (firstDay - 1))/7); }
"d" should be the date.