All pastes #273667 Raw Edit

Something

public text v1 · immutable
·published 2006-12-10 01:48 UTC
rendered paste body
    Public Function olderAge(ByVal alder As String, ByVal bursdag As Date, ByVal regDato As Date)
        Dim newAge As Integer
        Dim nextYear As Date = regDato.AddYears(1)
        '   MsgBox(Date.Compare(regDato, bursdag))
        If regDato.Month > bursdag.Month Then
            If Now.Year > regDato.Year Then
                newAge = alder + 1
            Else
                newAge = alder
            End If
        Else
            newAge = alder
        End If

        Return newAge
    End Function