Exemple #1
0
        public bool Contains(DayInstance day)
        {
            if (string.IsNullOrEmpty(day.Day))
            {
                return(false);
            }

            DateTime.TryParseExact(day.Day, "dd.MM.yyyy", null, DateTimeStyles.None, out var date);
            return(InBounds(date));
        }
Exemple #2
0
 public WeekInstance(DayInstance dayInit)
 {
     day = new List <DayInstance>
     {
         dayInit
     };
     DateTime.TryParseExact(dayInit.Day, "dd.MM.yyyy", null, DateTimeStyles.None, out var date);
     Sdate   = StartOfWeek(date, DayOfWeek.Monday);
     Edate   = Sdate.AddDays(6);
     WeekNum = GetIso8601WeekOfYear(Sdate);
 }