public static PersianDate ToPersian(this DateTime date) { try { return(PersianDate.GetDate(date)); } catch { return(null); } }
public static string ToPersianShort(this DateTime date, bool ContainsTime = false) { try { return(PersianDate.GetDate(date).ToShortString() + " " + (ContainsTime ? date.ToString("HH:mm:ss") : "")); } catch { return(""); } }
public PersianDate AddYears(int count) { return(PersianDate.GetDate(this.MiladyDate.AddYears(count))); }