Esempio n. 1
0
 /// <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));
 }
Esempio n. 2
0
 /// <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));
 }
Esempio n. 3
0
 /// <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));
 }
Esempio n. 4
0
 /// <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));
 }