private int GetWholeMonths(DateTime start, DateTime end) { if (start.Day != 1) { start = new DateTime(start.Year, start.Month, 1).AddMonths(1); } return (end.Month - start.Month) + 12 * (end.Year - start.Year); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)