home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
221.214.14.186
/
221.214.14.186.tar
/
221.214.14.186
/
zb
/
Notepad-1
/
time.asp
< prev
next >
Wrap
Text File
|
2004-12-09
|
1KB
|
56 lines
<%
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(dateadd("h",timeDiff,now))
if thour<10 then
thour="0"&thour
end if
if tminute<10 then
tminute="0"&tminute
end if
dnt=datediff("d",tday,nowday)
if dnt>2 then
dayshow=year(t)
if (month(t)<10) then
dayshow=dayshow&"-0"&month(t)
else
dayshow=dayshow&"-"&month(t)
end if
if (day(t)<10) then
dayshow=dayshow&"-0"&day(t)
else
dayshow=dayshow&"-"&day(t)
end if
times=dayshow
exit function
elseif dnt=0 then
dayshow="╜±╠∞ "
elseif dnt=1 then
dayshow="╫≥╠∞ "
elseif dnt=2 then
dayshow="╟░╠∞ "
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
%>