예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }