'Aunque no creo que sea de gran utilidad lo dejo por si acaso, permite verificar si la fecha que se envia por los parametros, es correcta o no
'retornando un false o true
Public Class verificarfecha
Public Function valifecha(ByVal dd, ByVal mm, ByVal aa)
Dim sw As Boolean = True
Dim dm As Integer = 31
If mm = 4 Or mm = 6 Or mm = 9 Or mm = 11 Then
dm = 30
End If
If mm = 2 Then
If aa Mod 4 = 0 Then
dm = 29
Else
dm = 28
End If
End If
sw = True
If mm < 1 Or mm > 12 Then
sw = False
End If
If dd < 1 Or dd > dm Then
sw = False
End If
Return (sw)
End Function
End Class
|