public override DateTime ToTime() { int day = (int)arg0.ToNumber(); int month = (int)arg1.ToNumber(); int year = (int)arg2.ToNumber(); TimeValidator.ValidateDate(day, month, year); return(new DateTime(year, month, day, 0, 0, 0)); }
public override DateTime ToTime() { int years = (int)year.ToYear(); int months = (int)month; int days = (int)day.ToDay(); int hours = (int)clock.ToHour(); int minutes = (int)clock.ToMinute(); int seconds = (int)clock.ToSecond(); TimeValidator.ValidateDate(days, months, years); TimeValidator.ValidateClock(hours, minutes, seconds); return(new DateTime(years, months, days, hours, minutes, seconds)); }