public Nullable <DateTime> Parse(string value) { Match m = CurrentRegex.Match(value); if (!m.Success) { return(null); } Group year = m.Groups["Year"]; Group month = m.Groups["Month"]; Group day = m.Groups["Day"]; if (DateType.ToUpper() == "Gregorian".ToUpper()) { return(ParseGEDate(string.Format("{0}/{1}/{2}", year.Value, month.Value, day.Value))); } else if (DateType.ToUpper() == "Taiwan".ToUpper()) { int pYear; if (int.TryParse(year.Value, out pYear)) { pYear += 1911; } else { return(null); } return(ParseGEDate(string.Format("{0}/{1}/{2}", pYear, month.Value, day.Value))); } else { return(null); } }
public override string ToString() { return($"{Ticker},{Date:yyyy-MM-dd},{DateType.ToUpper()},{EpsEstimate},{EpsActual}"); }