/// <summary> /// Converts the value of the current PersianDateTime object to short date string format. /// </summary> /// <returns></returns> public string ToShortDateString() { return(PersianDateTimeFormatter.Format(this, "d", PersianDateTimeFormatInfo.DateTimeFormatInfo)); }
/// <summary> /// Converts the value of the current PersianDateTime object to its equivalent string representation using the provided format. /// </summary> /// <param name="format"></param> /// <returns></returns> public string ToString(string format) { return(PersianDateTimeFormatter.Format(this, format, PersianDateTimeFormatInfo.DateTimeFormatInfo)); }
/// <summary> /// Converts the value of the current PersianDateTime object to long Date string format. /// </summary> /// <returns></returns> public string ToLongDateString() { return(PersianDateTimeFormatter.Format(this, "D", PersianDateTimeFormatInfo.DateTimeFormatInfo)); }
/// <summary> /// Converts the value of the current PersianDateTime object to its equivalent string representation using the default format. /// </summary> /// <returns></returns> public override string ToString() { return(PersianDateTimeFormatter.Format(this, null, PersianDateTimeFormatInfo.DateTimeFormatInfo)); }