Exemple #1
0
        public static void CheckDateValid(DateTime date)
        {
            var minAmount = new DateTime(1970, 1, 1);
            var maxAmount = DateTime.MaxValue;

            if (!Validation.CheckDateWithinRange(minAmount, maxAmount, date))
            {
                throw new System.Exception("The date entered was out of range. Value must lie between " + minAmount.ToString("d") + " and " + maxAmount.ToString("d") + ".");
            }
        }