Dim d As Date = #8/22/2015#
Dim fd As Date = new Date(d.Year,d.Month,1)'月首Dim ld As Date = new Date(d.AddMonths(1).Year,d.AddMonths(1).Month,1).AddDays(-1)'月末Dim f As Integer = fd.DayOfWeekDim ls As Integer = ld.DayOfWeekDim w As Integer = (ld.Day - (7-f) - ls -1)/7+2
Output.Show(w)