Sub AppStart (Args() As String)
Dim dates As List = MonthsAndYears(2, 2022, 5, 2024) 'march 2022 -> june 2024
Log(dates)
End Sub
Private Sub MonthsAndYears(StartMonth0Based As Int, StartYear As Int, EndMonth0Based As Int, EndYear As Int) As List
Dim res As List
res.Initialize
Dim month As Int = StartMonth0Based
Dim year As Int = StartYear
Dim months As List =DateUtils.GetMonthsNames
Do While True
res.Add(months.Get(month) & " " & year)
If year > EndYear Or (year = EndYear And month >= EndMonth0Based) Then
Exit
End If
month = month + 1
If month >= 12 Then
month = 0
year = year + 1
End If
Loop
Return res
End Sub