title: How do I use DateTime.TryParse() for non-English languages like Arabic?
body: <p>I need to convert strings to DateTime objects that are in non-English languages. I've seen many examples of converting DateTime to strings in other languages, but not the other way around.</p>
  
  <p>This doesn't seem to work:</p>
  
  <pre><code>CultureInfo provider = new CultureInfo("ar-AE");    // Arabic - United Arab Emirates
  
  string sample = "الاربعاء 16 مارس 2011"; // Arabic date in Gregorian calendar
  DateTime result;
  DateTime expected = new DateTime(2011, 3, 16);   // the expected date
  bool b;
  
  b = DateTime.TryParse(sample, provider, DateTimeStyles.None, out result);
  
  Assert.IsTrue(b);
  Assert.AreEqual(expected, result);
  </code></pre>
  
  <p>Additionally, I need to handle strings that are in other calendars. This is what I tried and it doesn't seem to work either.</p>
  
  <pre><code>CultureInfo provider = new CultureInfo("ar-AE");    // Arabic - United Arab Emirates
  provider.DateTimeFormat.Calendar = new System.Globalization.HijriCalendar();
  // Wednesday, March 16, 2011, 11 Rabi second in 1432
  string sample = " ‏11 ربيع ثاني 1432 ";
  DateTime result;
  DateTime expected = new DateTime(2011, 3, 16);   // ?
  bool b;
  
  b = DateTime.TryParse(sample, provider, DateTimeStyles.None, out result);
  
  Assert.IsTrue(b);
  Assert.AreEqual(expected, result);
  </code></pre>
  
  <p>What am I missing?</p>