Possible Duplicate:
How to determine number Saturdays and Sundays comes between two dates in java script
I want to find the no of Sundays in a month using javascript
i am passing month and year to a function
i am able to calculate total days using
<script type="text/javascript">
function daysInMonth(month, year) {
return new Date(year, month, 0).getDate();
}
</script>
but need to find no of sundays
Please suggest
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date