Discuz教程网

asp的日期转换星座函数

[复制链接]
authicon dly 发表于 2010-11-6 17:57:49 | 显示全部楼层 |阅读模式
  1. '日期转换星座函数,参数是日期型
  2. function astro(birth)
  3. astro=""
  4. if birth="" or not isdate(birth) Then exit function
  5. birthmonth=month(birth) : if birthmonth<10 then birthmonth="0" & birthmonth
  6. birthday=day(birth) : if birthday<10 then birthday="0" & birthday
  7. birth=trim(birthmonth & birthday) '重整月日,0903型

  8. rAstro=split("水瓶座*0120*0219#双鱼座*0220*0320#白羊座*0321*0420#金牛座*0421*0521#双子座*0522*0621#巨蟹座*0622*0722#狮子座*0723*0823#处女座*0824*0923#天秤座*0924*1023#天蝎座*1024*1122#射手座*1123*1222#摩蝎座*1222*0119#","#")

  9. astro="摩蝎座" '这个是跨年的,不好对比,先默认
  10. for i_ls=0 to ubound(rAstro)-2
  11. rls2=split(rAstro(i_ls) & "*","*")
  12. if birth>=rls2(1) and birth<=rls2(2) then
  13.   astro=rls2(0)
  14.   exit for
  15. end if
  16. next
  17. end function
复制代码





上一篇:高仿google suggest ajax示例
下一篇:动态程序防采集的新方法
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

GMT+8, 2025-5-3 05:39

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表