|
Warning!
Due to a bug in DatePart ASP Function from Microsoft, the Week
Numbers will be wrong in 2005 calendar in ASPPack V2.1.0 and previous.
!
To
fix the problem you must change DatePart('ww',date) function with
a new one WEEKNR(date), in the source code :
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' DatePart("ww", bug fix
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function WEEKNR(InputDate )
Dim A , B , C, D
WEEKNR = 0
If InputDate < 1 Then Exit Function
A = Weekday(InputDate, vbSaturday)
B = Year(InputDate + ((8 - A) Mod 7) - 3)
C = DateSerial(B, 1, 1)
D = (Weekday(C, vbSaturday) + 1) Mod 7
if D<1 then D=7
WEEKNR = Int((InputDate - C - 3 + D) / 7) + 1
End Function
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
1)
Copy and paste the function at the bottom of the file db_environment.asp
after the instruction :
myBanner_height=60
2) in the files
agenda_Box.asp, Agenda_Global_Box.asp, Agenda_Month.asp, Agenda_Week.asp
replace DatePart("ww",
by WEEKNR(
Thanks a lot for your comprehension,
ASPPack Team
Microsoft
information about this bug
|