Exemple #1
0
        public bool CheckDateTime(DateTime?dateTime = null)
        {
            var time = dateTime ?? DateTime.Now;

            return(Minutes.Contains(time.Minute) &&
                   Hours.Contains(time.Hour) &&
                   Months.Contains(time.Month - 1) &&
                   (DaysOfMonth.Contains(time.Day - 1) || DaysOfWeek.Contains((int)time.DayOfWeek - 1)));
        }