WikiFunctions.Tools.DateBeforeToday C# (CSharp) Method

DateBeforeToday() public static method

Attempts to parse the input string as a date, if parsed returns whether the date is before the system date Otherwise returns false
public static DateBeforeToday ( string date ) : bool
date string
return bool
        public static bool DateBeforeToday(string date)
        {
            try
            {
                DateTime dt = DateTime.Parse(date);

                if (dt.CompareTo(DateTime.Now) < 0)
                    return true;
            }
            catch
            {
                return false;
            }

            return false;
        }
Tools