Пример #1
0
        public override bool IsPeselValid(string pesel)
        {
            var myChecksum = new PeselChecksum();
            var myDate     = new IsCorrectDate();
            var myDateCut  = new CutDate(pesel);

            if (myChecksum.IsCorrect(pesel) &&
                myDate.isCorrectDay(myDateCut.CalculateDay(), myDateCut.CalculateMonth(), myDateCut.CalculateYear()))
            {
                return(true);
            }
            return(false);
        }
Пример #2
0
        protected override bool ValidateDate(int year, int month, int day)
        {
            var myDate = new IsCorrectDate();

            return(myDate.isCorrectDay(day, month, year));
        }