VBScript计算一个月有多少天

Function DaysOfMonth(aYear,aMonth)
    For i = 31 To 28 step -1
        If   IsDate(CStr(aYear)&"- "&CStr(aMonth)&"- "&i)   Then 
            DaysOfMonth   =   i 
            Exit   Function 
        End   If 
    Next 
End   Function 
 

你可能感兴趣的:(VBScript)