예제 #1
0
 public bool ValidateDate(int year, int month, int day)
 {
     try{
         int preciseYear = new YearByPeselMonthGenerator().GetYear(month) + year;
         if (DaysInMonthValidator.IsCorrectCountOfDays(year, month % 20, day))
             return !IsDateInFuture(preciseYear, month % 20, day);
     }
     catch
     {
         // ignored
     }
     return false;
 }
예제 #2
0
 public bool ValidateDate(int year, int month, int day)
 {
     try{
         int preciseYear = new YearByPeselMonthGenerator().GetYear(month) + year;
         if (DaysInMonthValidator.IsCorrectCountOfDays(year, month % 20, day))
         {
             return(!IsDateInFuture(preciseYear, month % 20, day));
         }
     }
     catch
     {
         // ignored
     }
     return(false);
 }