2个回答
展开全部
'当前时间
dtmtoday = now()
'本月第一天
starttime = year(dtmtoday) & "-" & month(dtmtoday) & "-1"
'本月最后一天
endtime = dateadd("d",-1,dateadd("m",1,starttime))
for i=1 to day(endtime)
response.write(i &"日 "& getWeekDay(Weekday(dateadd("d",i-1,starttime))) &"<br>")
next
function getWeekDay(pVal)
select case pVal
case 1: getWeekDay="星期天"
case 2: getWeekDay="星期一"
'....自己完善一下:)
case 7: getWeekDay="星期六"
end select
end function
dtmtoday = now()
'本月第一天
starttime = year(dtmtoday) & "-" & month(dtmtoday) & "-1"
'本月最后一天
endtime = dateadd("d",-1,dateadd("m",1,starttime))
for i=1 to day(endtime)
response.write(i &"日 "& getWeekDay(Weekday(dateadd("d",i-1,starttime))) &"<br>")
next
function getWeekDay(pVal)
select case pVal
case 1: getWeekDay="星期天"
case 2: getWeekDay="星期一"
'....自己完善一下:)
case 7: getWeekDay="星期六"
end select
end function
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<%
thedate=date()
n= DateDiff("d",year(thedate)&"-"&month(thedate)&"-1",DateAdd("m",1,CDate(year(thedate)&"-"&month(thedate)&"-1")))
WeekStr="|星期日|星期一|星期二|星期三|星期四|星期五|星期六"
WeekStrSplit=split(WeekStr,"|")
for i=1 to n
Response.Write month(thedate) &"月"& i & "日:" & WeekStrSplit(weekday(i)) &" <br />"
next
%>
thedate=date()
n= DateDiff("d",year(thedate)&"-"&month(thedate)&"-1",DateAdd("m",1,CDate(year(thedate)&"-"&month(thedate)&"-1")))
WeekStr="|星期日|星期一|星期二|星期三|星期四|星期五|星期六"
WeekStrSplit=split(WeekStr,"|")
for i=1 to n
Response.Write month(thedate) &"月"& i & "日:" & WeekStrSplit(weekday(i)) &" <br />"
next
%>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询