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