无意中看到一个判断是否润年的方法,由于我对润不润一点都不知,所有不知是否可行。
[ Last edited by baomaboy on 2008-3-25 at 01:01 AM ]
'思想:判断这年是不是用2月29日,如果有则是闰年,否则不是闰年!
Dim Years 'As String
Years=inputbox("请输入您想要查询的年份:","查询年份",Year(Date))'得到的年份信息
If Years=False Then WScript.Quit
If IsDate(Years & "/2/29") Then
MsgBox chr(34)&Years&chr(34)&"年—该年是闰年"
Else
MsgBox chr(34)&Years&chr(34)&"年—该年不是闰年"
End If
[ Last edited by baomaboy on 2008-3-25 at 01:01 AM ]
