'****************************************************
'函数名:FormatTime
'作 用:时间格式化
'参 数:DateTime ----要格式化的时间
' Format ----格式的形式
'****************************************************
Public Function FormatTime(DateTime,Format)
select case Format
case "1"
FormatTime=""&year(DateTime)&"年"&month(DateTime)&"月"&day(DateTime)&"日"
case "2"
FormatTime=""&month(DateTime)&"月"&day(DateTime)&"日"
case "3"
FormatTime=""&year(DateTime)&"/"&month(DateTime)&"/"&day(DateTime)&""
case "4"
FormatTime=""&month(DateTime)&"/"&day(DateTime)&""
case "5"
FormatTime=""&month(DateTime)&"月"&day(DateTime)&"日"&FormatDateTime(DateTime,4)&""
case "6"
temp="周日,周一,周二,周三,周四,周五,周六"
temp=split(temp,",")
FormatTime=temp(Weekday(DateTime)-1)
case Else
FormatTime=DateTime
end select
End Function
'----------------------杂项---------------------
'****************************************************
'函数名:Zodiac
'作 用:取得生消
'参 数:birthday ----生日
'****************************************************
public Function Zodiac(birthday)
if IsDate(birthday) then
birthyear=year(birthday)
ZodiacList=array("猴","鸡","狗","猪","鼠","牛","虎","兔","龙","蛇","马","羊")
Zodiac=ZodiacList(birthyear mod 12)
end if
End Function
'****************************************************
'函数名:Constellation
'作 用:取得星座
'参 数:birthday ----生日
'****************************************************
public Function Constellation(birthday)
if IsDate(birthday) then
ConstellationMon=month(birthday)
ConstellationDay=day(birthday)
if Len(ConstellationMon)<2 then ConstellationMon="0"&ConstellationMon
if Len(ConstellationDay)<2 then ConstellationDay="0"&ConstellationDay
MyConstellation=ConstellationMon&ConstellationDay
if MyConstellation < 0120 then
constellation="<img src=images/Constellation/g.gif title='魔羯座 Capricorn'>"
elseif MyConstellation < 0219 then
constellation="<img src=images/Constellation/h.gif title='水瓶座 Aquarius'>"
elseif MyConstellation < 0321 then
constellation="<img src=images/Constellation/i.gif title='双鱼座 Pisces'>"
elseif MyConstellation < 0420 then
constellation="<img src=images/Constellation/^.gif title='白羊座 Aries'>"
elseif MyConstellation < 0521 then
constellation="<img src=images/Constellation/_.gif title='金牛座 Taurus'>"
elseif MyConstellation < 0622 then
constellation="<img src=images/Constellation/`.gif title='双子座 Gemini'>"
elseif MyConstellation < 0723 then
constellation="<img src=images/Constellation/a.gif title='巨蟹座 Cancer'>"
elseif MyConstellation < 0823 then
constellation="<img src=images/Constellation/b.gif title='狮子座 Leo'>"
elseif MyConstellation < 0923 then
constellation="<img src=images/Constellation/c.gif title='处女座 Virgo'>"
elseif MyConstellation < 1024 then
constellation="<img src=images/Constellation/d.gif title='天秤座 Libra'>"
elseif MyConstellation < 1122 then
constellation="<img src=images/Constellation/e.gif title='天蝎座 Scorpio'>"
elseif MyConstellation < 1222 then
constellation="<img src=images/Constellation/f.gif title='射手座 Sagittarius'>"
elseif MyConstellation > 1221 then
constellation="<img src=images/Constellation/g.gif title='魔羯座 Capricorn'>"
end if
end if
End Function









