public static HijriDateTime Parse(DateTime dateTime) { var cal = new HijriCalendar(); var result = new HijriDateTime { Year = cal.GetYear(dateTime), Month = cal.GetMonth(dateTime), Day = cal.GetDayOfMonth(dateTime), Hour = cal.GetHour(dateTime), Minute = cal.GetMinute(dateTime), Second = cal.GetSecond(dateTime) }; return result; }
public HijriDateTime() { var dateTime = DateTime.Now; var calendar = new HijriCalendar(); Year = calendar.GetYear(dateTime); Month = calendar.GetMonth(dateTime); Day = calendar.GetDayOfMonth(dateTime); Hour = calendar.GetHour(dateTime); Minute = calendar.GetMinute(dateTime); Second = calendar.GetSecond(dateTime); }