// Validation of an DayVarType instance private static void ValidateDayVarType(DayVarType day, List <Exception> exceptions) { if (!day.DayOfMonth.HasValue) { exceptions.Add(new InvalidOperationException("Das Element \"SpecialDayDate\" ist ungültig.")); } if (!day.Month.HasValue) { day.Monthly = true; } if (!day.Year.HasValue) { day.Yearly = true; } }
public static DateTime GetDate(this DayVarType date) { return(new DateTime((int)date.Year, (int)date.Month, (int)date.DayOfMonth)); }