コード例 #1
0
        public bool IsHoliDay(DateTime day)
        {
            var map = holidaysObservancesCache.GetOrAdd(day.Year, () => BuildObservancesMap(day.Year));

            return(map.Any(m => m.Key.Date == day.Date));
        }
コード例 #2
0
 public override DateTime?GetInstance(int year)
 {
     return(dayCache.GetOrAdd(year, () => CalculateDayInYear(year)));
 }
コード例 #3
0
 public static DateTime CalculateEasterDate(int year)
 {
     return(easterPerYear.GetOrAdd(year, () => GetEasterDate(year)));
 }