文章导航PC6首页软件下载单机游戏安卓资源苹果资源

pc软件新闻网络操作系统办公工具编程服务器软件评测

安卓新闻资讯应用教程刷机教程安卓游戏攻略tv资讯深度阅读综合安卓评测

苹果ios资讯苹果手机越狱备份教程美化教程ios软件教程mac教程

单机游戏角色扮演即时战略动作射击棋牌游戏体育竞技模拟经营其它游戏游戏工具

网游cf活动dnf活动lol周免英雄lol礼包

手游最新动态手游评测手游活动新游预告手游问答

您的位置:首页网页设计ASP实例 → 功能非常全面的日期处理函数

功能非常全面的日期处理函数

时间:2004/11/7 2:56:00来源:本站整理作者:蓝点我要评论(0)



<%



call writedropdowns



Sub writeDropDowns()

  Dim strSelfLink

  strSelfLink = request.servervariables("SCRIPT_NAME")

  response.Write "
" & vbcrlf

  response.Write MonthDropDown("month1",False,request("month1"),strSelfLink) & " " & DayDropDown("day1", "",getDaysInMonth(request("month1"),request("year1")),request("day1")) & " " & YearDropDown("year1","","", request("year1"),strSelfLink) & vbcrlf

  response.Write "
"    & vbcrlf

End Sub

        



Function MonthDropDown(strName, blnNum, strSelected, strSelfLink)

  Dim strTemp, i, strSelectedString            

  strTemp = "" & vbcrlf    

  MonthDropDown = strTemp

End Function





Function YearDropDown(strName, intStartYear, intEndYear, strSelected, strSelfLink)

  

  Dim strTemp, i, strSelectedString    

  

  If intStartYear = "" Then

    intStartYear = Year(now())

  End If    

    

  If intEndYear = "" Then

    intEndYear = Year(now()) + 9

  End If

    

  strTemp = "" & vbcrlf    

   YearDropDown = strTemp

End Function





Function DayDropDown(strName, intStartDay, intEndDay, strSelected )

    Dim strTemp, i, strSelectedString    

    If intStartDay = "" Then

      intStartDay = 1

    End If    

    

    If intEndDay = "" Then

      intEndDay = getDaysInMonth(Month(now()),Year(now()))

    End If

    

    strTemp = "" & vbcrlf    

    DayDropDown = strTemp

End Function





Function getDaysInMonth(strMonth,strYear)

        Dim strDays     

    Select Case CInt(strMonth)

        Case 1,3,5,7,8,10,12:

        strDays = 31

        Case 4,6,9,11:

           strDays = 30

        Case 2:

        If  ( (CInt(strYear) Mod 4 = 0  And  CInt(strYear) Mod 100 <> 0)  Or ( CInt(strYear) Mod 400 = 0) ) Then

          strDays = 29

        Else

          strDays = 28

        End If    

        'Case Else:

    End Select

        

    getDaysInMonth = strDays

End Function    

%>    


相关阅读 Windows错误代码大全 Windows错误代码查询激活windows有什么用Mac QQ和Windows QQ聊天记录怎么合并 Mac QQ和Windows QQ聊天记录Windows 10自动更新怎么关闭 如何关闭Windows 10自动更新windows 10 rs4快速预览版17017下载错误问题Win10秋季创意者更新16291更新了什么 win10 16291更新内容windows10秋季创意者更新时间 windows10秋季创意者更新内容kb3150513补丁更新了什么 Windows 10补丁kb3150513是什么

文章评论
发表评论

热门文章 没有查询到任何记录。

最新文章 迅雷新手完全入门手册 asp下面javascript上传图片限制格式大小方法告诉大家网页弹出窗口应用总结ASP常见错误类型大全asp常见错误分析和解决办法

人气排行 总是弹出visual studio 实时调试器 三种解决SQLSERVER存储过程及调用详解Asp获取真实IP地址ASP中连接Mssql的几种方法一个简单好用的UBB编辑器(含代码)如何用Split将字符串转换为数组并获取数组下ASP防止表单重复提交的办法告诉你免费的简单聊天室源代码