public static DateTime LastDateInMonth(this DateTime instance) { return instance.AddMonths(1).FirstDateInMonth().AddDays(-1); } }