public static DateTime ToMiladiDateTime(this EasyDate s) { PersianCalendar pc = new PersianCalendar(); var ret = pc.ToDateTime(s.Year, s.Month, s.Day, s.Hour ?? 0, s.Minute ?? 0, 0, 0); return(ret); }
public static EasyDate ToPersianDateInfo(this DateTime dateTime) { PersianCalendar pc = new PersianCalendar(); var r = new EasyDate() { Year = pc.GetYear(dateTime), Month = pc.GetMonth(dateTime), Day = pc.GetDayOfMonth(dateTime), Hour = pc.GetHour(dateTime), Minute = pc.GetMinute(dateTime) }; return(r); }
public static string ToShamsiDateTimeString(this EasyDate s) { return(s.ToShamsiDateString() + " - " + s.Hour + ":" + s.Minute); }
public static string ToShamsiDateString(this EasyDate s) { return(new DateTime(s.Year, s.Month, s.Day).ToPersianDate()); }
public static EasyDate ToMiladiInfo(this EasyDate s) { return(ToMiladiDateTime(s).ToDateiInfo()); }