<SCRIPT>
var year = 2001;
var month = 2;
var theDate = new Date(year,month,1);
theDate = new Date(theDate.valueOf() - 24*60*60*1000);
alert(theDate.getDate());
</SCRIPT>
var year = 2001;
var month = 2;
var theDate = new Date(year,month,1);
theDate = new Date(theDate.valueOf() - 24*60*60*1000);
alert(theDate.getDate());
</SCRIPT>
var year = 2000;
var month = 2;
var theDate = new Date(year,month,0);
alert(theDate.getDate());
</SCRIPT>