예제 #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));
 }
예제 #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));
 }
예제 #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));
 }
예제 #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));
 }