How to convert between calendars? Here is what I have:
UmAlQuraCalendar hijri = new UmAlQuraCalendar();
GregorianCalendar cal = new GregorianCalendar();
DateTime hijriDate = new DateTime(1434, 11, 23, hijri);
DateTime gregorianDate = ...; //
I need a gregorianDate
that corresponds to the hijriDate
.
It seems that the Date saved in
DateTime
is always in the current calendar. So if the current calendar is GregorianhijriDate
is already in Gregorian.If your current calendar is
UmAlQuraCalendar
you should be able to extract a Gregorian date using: