推荐下天枫常用ASP函数封装,推荐大家使用

2019-04-02 04:46:55于丽

    '函数名: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'>"