https://foro.gambas-es.org/viewtopic.php?f=5&t=5117&p=29899#p29899
-----------------------------------
shordi
Lunes, 25 Enero 2016, 19:16

Re: Saber Los Dias Que Tiene Un Mes
-----------------------------------
Aquí con bisiestos:

[code linenumbers=false syntax=gambas]Public Function ultimoDia(mes As Integer, ano As Integer) As Integer

Dim nMaxDias As New Integer[4, 6, 9, 11]

If mes = 2 Then 
    If (Ano Mod 4 = 0) Then
        Return 29
    Else
        Return 28
    Endif
Endif
If nMaxDias.Exist(mes) Then Return 30
Return 31

End
[/code]


