public static bool IsEaster(DateTime today) { DateTime startDate = LiturgicalCalendar.LiturgicalFlags.Easter; DateTime endDate = LiturgicalCalendar.LiturgicalFlags.PentecostSunday; bool isEaster = CalendarCalculations.IsWithinDates(today, startDate, endDate); return(isEaster); }
public static bool IsChristmas(DateTime today) { DateTime startDate = LiturgicalCalendar.LiturgicalFlags.Dec31; DateTime endDate = LiturgicalCalendar.LiturgicalFlags.Baptism; bool isChristmas = CalendarCalculations.IsWithinDates(today, startDate, endDate); return(isChristmas); }
public static bool IsLent(DateTime today) { DateTime startDate = LiturgicalCalendar.LiturgicalFlags.AshWednesday; DateTime endDate = LiturgicalCalendar.LiturgicalFlags.Easter; bool isAdvent = CalendarCalculations.IsWithinDates(today, startDate, endDate); return(isAdvent); }
public static bool IsAdvent(DateTime today) { DateTime startDate = LiturgicalCalendar.LiturgicalFlags.ApostleStAndrew; DateTime endDate = LiturgicalCalendar.LiturgicalFlags.Dec31; bool isAdvent = CalendarCalculations.IsWithinDates(today, startDate, endDate); return(isAdvent); }
public static bool IsOrdinary(DateTime today) { DateTime startDate1 = LiturgicalCalendar.LiturgicalFlags.StartFirstOrdinaryTime; DateTime endDate1 = LiturgicalCalendar.LiturgicalFlags.AshWednesday; DateTime startDate2 = LiturgicalCalendar.LiturgicalFlags.StartSecondOrdinaryTime; DateTime endDate2 = CalendarCalculations.NearestSunday(new DateTime(LiturgicalCalendar.LiturgicalFlags.year, 11, 30)); // ApostleStAndrew this year bool isOrdinary1 = CalendarCalculations.IsWithinDates(today, startDate1, endDate1); bool isOrdinary2 = CalendarCalculations.IsWithinDates(today, startDate2, endDate2); bool isOrdinary = (isOrdinary1 || isOrdinary2); return(isOrdinary); }