using System.Collections.Generic;
using static System.Globalization.DateTimeFormatInfo;
public static void Main()
var stringContainers = Helpers.RangeDetails(Helpers.MonthNames());
StringBuilder builder = new();
foreach (var container in stringContainers)
builder.AppendLine($"{container.Value,-12} {container.StartIndex,-6} {container.EndIndex, -7}{container.MonthIndex}");
Console.WriteLine("Month Start End Month Index");
Console.WriteLine(" range range index");
Console.WriteLine(builder);
public class Container<T>
public T Value { get; set; }
public Index StartIndex { get; set; }
public int MonthIndex { get; set; }
public Index EndIndex { get; set; }
public static List<string> MonthNames()
=> CurrentInfo!.MonthNames[..^1].ToList();
public static List<Container<T>> RangeDetails<T>(List<T> list)
var elementsList = list.Select((element, index) => new Container<T>
StartIndex = new Index(index),
EndIndex = new Index(Enumerable.Range(0, list.Count)
.Reverse().ToList()[index], true),