i have downloaded the calender.bas from the WIKI and i think that there is a mistake in this function:
Code: Select all
Public Function MonthDays(PYear As Word,PMonth As Byte) As Byte
Const MonthLookup(13) As Byte = (0,31,29,31,30,31,30,31,31,30,31,30,31)
MonthDays = MonthLookup(PMonth)
If PMonth = 2 Then
If CheckLeap(PYear) Then
Inc (MonthDays)
EndIf
End If
End Function
Code: Select all
Public Function MonthDays(PYear As Word,PMonth As Byte) As Byte
Const MonthLookup(13) As Byte = (0,31,28,31,30,31,30,31,31,30,31,30,31)
MonthDays = MonthLookup(PMonth)
If PMonth = 2 Then
If CheckLeap(PYear) Then
Inc (MonthDays)
EndIf
End If
End Function