예제 #1
0
        // 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;
            }
        }
예제 #2
0
 public static DateTime GetDate(this DayVarType date)
 {
     return(new DateTime((int)date.Year, (int)date.Month, (int)date.DayOfMonth));
 }