NumWeeksInMonth

int = NumWeeksInMonth(nYear,nMonth, bFullWeeks, nWeekStart)

This macro function returns the number of weeks contained in a month for a given year.

•nYear : is the year (4 digits); this function takes leap years into account.

•nMonth : is the month (1-12).

•bFullWeeks : is used to indcate if the function should return number of full weeks, or the number of weeks, even if some are partial.

•nWeekStart : is the weekday used as the start of the week, values range from 1 (Monday) to 7 (Sunday).

In the examples below, nWeekStart = 7. If bFullWeeks = true, then the number of weeks for March is 4, and the number for April is 3. If bFullWeeks = false, then the number of weeks for March is 6, and the number for April is 5.

See also : NumDaysInMonth.

Topic 110114 updated on 01-Nov-2016.

Topic URL: http://www.qppstudio.net/webhelp/index.html?numweeksinmonth.htm