js get day count of month code example
Example 1: javascript get current day of month
new Date().getDate();//gets day of month (1-31)
Example 2: daysinmonth javascript
var dt = new Date();
var month = dt.getMonth();
var year = dt.getFullYear();
daysInMonth = new Date(year, month, 0).getDate();