yearsBetween function
List of years from start.year through end.year (inclusive).
Implementation
List<int> yearsBetween(DateTime start, DateTime end) {
final List<int> out = <int>[];
for (int y = start.year; y <= end.year; y++) {
out.add(y);
}
return out;
}