Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 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);
 }