휑퍅변鑒윈嵐잚Ver0.1.1

2018-09-06 11:25

阅读:549

  릿齡덜쯤 덜쯤흔苟:
<%
瘻랙珂헝괏즛늪?荷討턴?侶뙈?荷塔뺘♤騷겅邇匙켄帽?
**************************±휑퍅윈嵐잚×Ver0.1.1********************************
역랙훙:Sman、NetFetch
역랙휑퍅:2005-11-11
경굶뵀:Ver0.1.1

바렘貢籃:
든綾錟
첼휑瞳窟QQ:1934129332050450
경홈?荷?경홈청唐,돝경꼇씩,都쯤무역,뻑短돝경,뻑短콱돕바렘貢籃윱璣헹連넣。
흔唐훨부맣쏵裂뇹,쮸럼瘻랙샀諒럽웩寧룀돕huihui3030@126.com、NetFetchStudio@163.com,Thanks!
圈玖賈痰綱츠샀렀절헝숨苟潼맒숭샀돕바렘籃듐샀Email젬溝苟潼!
************************************************************************************

ClassDateFunEx

Privated_
Privatefirstweekofyear_
Privatefirstdayofweek_

PrivateSubclass_initialize()
d_=date()칵훰뎠품휑퍅
firstdayofweek_=2vbMonday
firstweekofyear_=1譚1墩1휑杰瞳돨槿퍅역迦。
EndSub

橄昑setDate휑퍅
PublicPropertyLetsetDate(value)
OnErrorResumeNext
IfIsNumeric(value)Then
value=Cint(value)
Iflen(value)<3Thenvalue=20&right(0&value,2)
value=value&-1
EndIf
d_=cDate(value)
EndProperty

橄昑firstweekofyear첼쾨돨뒤寧鷺(圈玖?阮쳬踰壞?BS癎꿍)
PublicPropertyLetfirstweekofyear(value)
firstweekofyear_=cInt(value)
EndProperty

橄昑FirstDayofWeek첼鷺돨뒤寧莖(圈玖?阮쳬踰壞?BS癎꿍)
PublicPropertyLetfirstdayofweek(value)
firstdayofweek_=cInt(value)
EndProperty


------------------------------
묘콘綱츠:炬뒤섯鷺돨槿퍅섯角섯뵀
꽝鑒綱츠:y쾨,w鷺,week槿퍅(槿퍅寧1槿퍅莖7)
------------------------------
PublicFunctionGetWeekDate(y,w,DayofWeek)
DimNewYearDay
NewYearDay=CDate(y&-1-1)禱뎀
GetWeekDate=((NewYearDay-Weekday(NewYearDay,firstdayofweek_))+(w-1)*7+DayofWeek)
EndFunction

------------------------------
묘콘綱츠:삿돤캐쾨캐墩돨莖鑒
------------------------------
PublicFunctionGetMonthDayCount()
GetMonthDayCount=DateDiff(d,d_,DateAdd(m,1,d_))
EndFunction

------------------------------
묘콘綱츠:돤돕캐쾨캐墩돨뒤寧莖
------------------------------
PublicFunctionGetMonthFirstDay()
GetMonthFirstDay=CDate(Year(d_)&-&Month(d_)&-1)
EndFunction

------------------------------
묘콘綱츠:돤돕캐쾨돨캐墩돨離빈寧莖
------------------------------
PublicFunctionGetMonthLastDay()
GetMonthLastDay=CDate(Year(d_)&-&Month(d_)&-&DateDiff(d,d_,DateAdd(m,1,d_)))
EndFunction

------------------------------
묘콘綱츠:캐휑杰瞳돨鷺돨뒤寧莖돨휑퍅
------------------------------
PublicFunctionWeekFirstDay()
WeekFirstDay=GetWeekDate(Year(d_),DatePart(ww,d_,firstdayofweek_,firstweekofyear_),1)
EndFunction

------------------------------
묘콘綱츠:캐휑杰瞳돨鷺돨뒤離빈寧莖돨휑퍅
------------------------------
PublicFunctionWeekLastDay()
WeekLastDay=GetWeekDate(Year(d_),DatePart(ww,d_,firstdayofweek_,firstweekofyear_),7)
EndFunction

EndClass
%>

꿎桿女충:
릿齡덜쯤 덜쯤흔苟:
<%@LANGUAGE=VBSCRIPTCODEPAGE=936%>
<%OptionExplicit%>
<!DOCTYPEhtmlPUBLIC-//W3C//DTDXHTML1.0Transitional//EN
<htmlxmlns=
<head>
<metahttp-equiv=Content-Typecontent=text/html;charset=gb2312/>
<title>Test_clsDateFunEx</title>
</head>

<body>
<!--#includefile=clsDateFunEx.asp-->
<%
DimmyDateFun,strDate
strDate=2005-4-1
SetmyDateFun=newDateFunEx
myDateFun.setDate=strDate
Response.write2006쾨뒤2鷺돨槿퍅寧角섯뵀:&_
myDateFun.GetWeekDate(2006,2,1)&<br>
Response.Write2005쾨4墩돨莖鑒:&_
myDateFun.GetMonthDayCount&<br>
Response.Write2005쾨4墩돨뒤寧莖:&_
myDateFun.GetMonthFirstDay&<br>
Response.Write2005쾨4墩돨離빈寧莖:&_
myDateFun.GetMonthLastDay&<br>
Response.Write2005쾨4墩1휑杰瞳돨鷺돨뒤寧莖돨휑퍅:&_
myDateFun.WeekFirstDay&<br>
Response.Write2005쾨4墩1휑杰瞳돨鷺돨뒤離빈寧莖돨휑퍅:&_
myDateFun.WeekLastDay&<br>
SetmyDateFun=Nothing
%>
<br><br><br>
</body>
</html>


苟潼늪匡숭


评论


亲,登录后才可以留言!