public static DateTimeSsc Parse(string input, DateTimeSscCalendars calendarSource = DateTimeSscCalendars.Persian, DateTimeSscCalendars calendarTarget = DateTimeSscCalendars.Gregorian, char seperator = '/') { DateTimeSsc r = null; // string[] parts = input.Split(new char[] { seperator }); if (parts.Length == 3) { int y, m, d; try { y = int.Parse(parts[0]); m = int.Parse(parts[1]); d = int.Parse(parts[2]); if (DateTimeSsc.IsValidDate(calendarSource, y, m, d)) { r = new DateTimeSsc(calendarTarget, calendarSource, y, m, d); } } catch (Exception) { } } // return(r); }
public bool Equals(DateTimeSsc Date1, DateTimeSsc Date2) { return(Date1.DateTime.Equals(Date2.DateTime)); }