The code copy is as follows:
<%
'Please keep this statement information when forwarding, this statement will not affect your speed!
'******************************【Date Extension Class】Ver0.1.1*********************************
'Developers: Sman, NetFetch
'Development date: 2005-11-11
'version number: Ver0.1.1
'Official website: http://www.sman.cnhttp://www.ad0.cn
'Email: [email protected]@163.com
'Daily online QQ: 1934129332050450
'Copyright Statement: There is no copyright, no piracy is investigated, source code is disclosed, pirated version is welcome, and you are welcome to go to the official website to seek support.
'If there are any improvements, please forward or feedback a copy to [email protected], [email protected], Thanks!
'For detailed instructions or examples, please see the download attachment or contact the official website or email to download!
'************************************************************************************
ClassDateFunEx
Private_
Privatefirstweekofyear_
Privatefirstdayofweek_
PrivateSubclass_initialize()
d_=date()'Default current date
firstdayofweek_=2'vbMonday
firstweekofyear_=1' starts from the week on January 1.
EndSub
'property setDate date
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
'Properties firstweekofyear's first week of each year (refer to the VBS manual for details)