var countDown = new TimeSpan(DateTime.Now.Subtract(epsDate.Value).Ticks);
data.DaysInterval = countDown.Days; data.IsDayOf = (countDown.Days == 0); data.IsPastDue = (countDown.Ticks > 0); data.IsWithinTwoWeeks = (countDown.Days <= -14);
var acronym = GetSymbolDuePrefix(symbolType); var due = (data.IsPastDue && (data.DaysInterval > 1)) ? "Past Due ".ToUpper() : "Due ".ToUpper(); var interval = "Today"; if (data.DaysInterval == 1) interval = "1 Day"; if ((Math.Abs(data.DaysInterval) > 1) && data.IsPastDue) interval = string.Format("{0} Days", Math.Abs(data.DaysInterval)); if ((Math.Abs(data.DaysInterval) > 1) && !data.IsPastDue) interval = string.Format("in {0} Days", Math.Abs(data.DaysInterval));
data.DisplayText = string.Concat(acronym, due, interval, " (e)");