根据出生时间判断生肖

asp函数

2008-10-10 09:29

'--------------输入年月日 返回生肖
Function Zodiac(birthday)
dim birthyear,ZodiacList
If IsDate(birthday) Then  
birthyear = Year(birthday)  
ZodiacList = Array("猴", "鸡", "狗", "猪", "鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊")  
Zodiac = ZodiacList(birthyear Mod 12)  
else
Zodiac=FALSE
End If  
End Function

response.Write(Zodiac("1988-8-8"))