1. Calculate the number of days of the month
Gregoriancalendar Date = New Gregoriancalendar (); Date.Set (2004, 6, 1);
INT countday = Date.GetActualMaximum (date.day_of_month);