public static void Main()
DateTime today = DateTime.Now;
Console.WriteLine(today);
DateTime lastDay = today.LastDayOfMonth();
Console.WriteLine(lastDay);
Console.WriteLine(DateTime.Now.LastDayOfMonth());
public static class DateTimeExtensions
public static DateTime LastDayOfMonth(this DateTime date)
DateTime EOM = new DateTime(