Is there a C# function which will give me the last day of the most recently finished Quarter given a date?
For example,
var lastDayOfLastQuarter = So
A simple function can calculate the last days of the most recently completed month:
public static DateTime LastQuarter(DateTime date) { return new DateTime(date.Year, date.Month - ((date.Month - 1) % 3), 1).AddDays(-1); }