예제 #1
0
        public static bool IsParsable(string date)
        {
            if (string.IsNullOrEmpty(date) || date.StartsWith("0001"))
            {
                return false;
            }

            var dateTimeParser = new DateParser(TimeZoneInfo.Utc);

            try { dateTimeParser.Parse(date); }
            catch { return false; }

            return true;
        }
예제 #2
0
        public static DateTime Parse(string date, TimeZoneInfo timeZone)
        {
            var dateTimeParser = new DateParser(timeZone);

            return dateTimeParser.Parse(date);
        }