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; }
public static DateTime Parse(string date, TimeZoneInfo timeZone) { var dateTimeParser = new DateParser(timeZone); return dateTimeParser.Parse(date); }