根据日期得到生肖的ASP函数
更新时间:2008年01月18日 14:37:46 作者:
最近公司开放网站需要用到根据用户添加的出生日期得到生肖发现了这个函数。使用起来不错
根据生日时间返回所属生肖
<%
Function Zodiac(birthday)
If IsDate(birthday) Then
birthyear = Year(birthday)
ZodiacList = Array("猴", "鸡", "狗", "猪", "鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊")
Zodiac = ZodiacList(birthyear Mod 12)
End If
End Function
%>
复制代码 代码如下:
<%
Function Zodiac(birthday)
If IsDate(birthday) Then
birthyear = Year(birthday)
ZodiacList = Array("猴", "鸡", "狗", "猪", "鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊")
Zodiac = ZodiacList(birthyear Mod 12)
End If
End Function
%>
相关文章
Highlight patterns within strings
Highlight patterns within strings...2007-04-04用asp实现把文件打包成Xml文件包,带解包的ASP工具附下载
用asp实现把文件打包成Xml文件包,带解包的ASP工具附下载...2007-06-06
最新评论