⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 time.asp

📁 9seek 留言本源代码5.0版
💻 ASP
字号:
<%
function times(t)
	if not isdate(t) then exit function
	dim thour, tminute, tday, nowday, dnt, dayshow, pshow
	thour=hour(t)
	tminute=minute(t)
	tday=datevalue(t)
	nowday=datevalue(now)
	
	dnt=datediff("d",tday,nowday)
	if dnt=0 then
	   dayshow="今天"
	elseif dnt=1 then
	   dayshow="昨天"
	elseif dnt=2 then
	   dayshow="前天"
	else
	   times=tday
	   exit function
	end if
	
	if thour>=7 and thour<11 then
	   pshow="上午"
	elseif thour>=11 and thour<14 then
	   pshow="中午"
	elseif thour>=14 and thour<18 then
	   pshow="下午"
	elseif thour>=18 then
	   pshow="晚上"
	elseif thour>=0 and thour<7 then
	  pshow="清晨"
	else
	  pshow="难说"
	end if
	
	times=dayshow&pshow&thour&":"&tminute
end function
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -