Try string date_in_oth_culture = dt.ToString(new CultureInfo("he-IL");
.
I hope it helps.
Edit: Sorry, I misunderstood what you mean. You can find more informations about how to use
HebrewCalendar
here.
Edit 2:
Unfortunately neither the code on the documentation seems working and on the internet I couldn't find anything.
A solution might be useing HebrewCalendar
to calculate new dates and then use a switch statement to translate them yourself.
HebrewCalendar hc = new HebrewCalendar();
CultureInfo culture = CultureInfo.CreateSpecificCulture("he-IL");
culture.DateTimeFormat.Calendar = hc;
DateTime hebrDate = hc.ToDateTime(year, month, day, hour, minute, second, millisecond, era); // Converts Hebrew date into Gregorian date
DateTime gregDate = new DateTime(2020, 2, 1); // Gregorian date
string hebrMonth;
switch(hc.GetMonth(gregDate))
{
case 1:
hebrMonth = "___";
break;
case 2:
hebrMonth = "___";
break;
// And so on
}
string finalDate = hc.getDayOfMonth(gregDate) + " " + hebrMonth + " " + hc.getYear(gregDate) + " " + hc.getEra(gregDate);
I hope it helps.