Cannot convert from Hijri Date to Gregorian date (c#)

here is the code it is working well now on this code I’m returning the date from the function as string not as datetime, but you can simply using return datetime type instead on string public string ConvertDateCalendar(DateTime DateConv, string Calendar, string DateLangCulture) { System.Globalization.DateTimeFormatInfo DTFormat; DateLangCulture = DateLangCulture.ToLower(); /// We can’t have the hijri … Read more

converting gregorian to hijri date

Firstly, separate out the conversion part from the formatting/parsing part. You can deal with those easily later – and there are lots of questions on Stack Overflow about that. Personally I’d use Joda Time, which typically makes life much simpler. For example: import org.joda.time.Chronology; import org.joda.time.LocalDate; import org.joda.time.chrono.IslamicChronology; import org.joda.time.chrono.ISOChronology; public class Test { public … Read more

How to Convert any of the 5 Islamic (Hijri) Calendars’ Dates to any of 18 World Calendars without External Libraries or Complex Astronomical Formulas

An engineer, physicist, and mathematician where on a train rolling through the English countryside, when the engineer looked out the window, and seeing a lone black sheep on the hillside, exclaimed, “Hey, look, England’s got black sheep!” The physicist quickly admonished him, “All we can ascertain is that England has one black sheep.” Whereupon the … Read more