Get_Zodiac(ByVal birthday)
参数:
birthday:传递生日时间。
代码:
Function Get_Zodiac(ByVal birthday)
Dim birthyear,Get_ZodiacList
If IsDate(birthday) Then
birthyear = Year(birthday)
Get_ZodiacList = Array("猴", "鸡", "狗", "猪", "鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊")
Get_Zodiac = Get_ZodiacList(birthyear Mod 12)
End If
End Function
应用:
Dim input,str
input="1988-05-15"
response.Write(Get_Zodiac(input))
返回:龙