public static void Main(string[] args)
const int ThreeMonthTargetAttendance = 30;
const int SixMonthTargetAttendance = 60;
const int TwelveMonthTargetAttendance = 120;
var patchStartDate = new DateTime(2019, 5, 1);
if (patchStartDate < DateTime.Now)
DateTime threeMonthStartDate = DateTime.Now.AddMonths(-3);
DateTime sixMonthStartDate = DateTime.Now.AddMonths(-6);
DateTime twelveMonthStartDate = DateTime.Now.AddMonths(-12);
if (patchStartDate > DateTime.Now.AddYears(-1))
threeMonthStartDate = sixMonthStartDate = twelveMonthStartDate = patchStartDate;
bool threeMonthEarned = GetClientAttendanceBetween(clientId, threeMonthStartDate, DateTime.Now) > ThreeMonthTargetAttendance;
bool sixMonthEarned = GetClientAttendanceBetween(clientId, sixMonthStartDate, DateTime.Now) > SixMonthTargetAttendance;
bool twelveMonthEarned = GetClientAttendanceBetween(clientId, twelveMonthStartDate, DateTime.Now) > TwelveMonthTargetAttendance;
Console.WriteLine("3 month: " + threeMonthEarned + ", 6 month: " + sixMonthEarned + ", 12 month: " + twelveMonthEarned);
Console.WriteLine("Done...");
private static int GetClientAttendanceBetween(int clientId, DateTime startDate, DateTime endDate)