public bool IsHoliDay(DateTime day) { var map = holidaysObservancesCache.GetOrAdd(day.Year, () => BuildObservancesMap(day.Year)); return(map.Any(m => m.Key.Date == day.Date)); }
public override DateTime?GetInstance(int year) { return(dayCache.GetOrAdd(year, () => CalculateDayInYear(year))); }
public static DateTime CalculateEasterDate(int year) { return(easterPerYear.GetOrAdd(year, () => GetEasterDate(year))); }