Hi, I would like to create a list of dates 1 month apart, from a date in the past until the last date before now. There is no while loop to check a condition to determine if to carry on with the next iteration. Is there a suggestion on how to do so?
Here is some code that does it once at least
var firstDate = events.get(0).dateTime;
var nextDate = firstDate.plus(months(1));
var dates = listOf<DateTime>();
if (nextDate.isBefore(now(), false)) {
dates.with(nextDate);
};