Private Sub class_initialize() d_ = date() '默认当前日期 firstdayofweek_ = 2 'vbMonday firstweekofyear_ = 1 '由 1 月 1 日所在的星期开始。 End Sub
'属性 setDate 日期 Public Property Let setDate(value) On Error Resume Next If IsNumeric(value) Then value = Cint(value) If len(value)< 3 Then value = "20" & right("0"&value,2) value = value & "-1" End If d_ = cDate(value) End Property
'属性 firstweekofyear 每年的第一周(详细设置请参照VBS手册) Public Property Let firstweekofyear(value) firstweekofyear_ = cInt(value) End Property