using System;
using System.Text.RegularExpressions;

namespace SCAN.lib
{
    class DateTimeUtils
    {
        public static bool validate(string date) 
        {
            string pattern = @"^(0[1-9]|[1-2][0-9]|3[0-1]|[1-9])([\-/](0[1-9]|1[0-2]|[1-9])([\-/](\d{2,4})))$";
            Match m = Regex.Match(date, pattern, RegexOptions.IgnoreCase);
            return m.Success;

        }
    }
}
