title: .NET - Canadian DateTime Format Bug
body: <p>I currently have an application that needs to support multiple cultures.  A date string is being passed in and is being parsed to a DateTime object.  To allow for multiple cultures I am first setting the thread's culture and UICulture.</p>
  
  <p>Here is an example of my code as it is:</p>
  
  <p>First I set the culture for this thread.  This is passed in on the URL (ex. en-us, en-ca, fr-ca):</p>
  
  <pre><code>CultureInfo ci = new CultureInfo(culture, false);
  Thread.CurrentThread.CurrentUICulture = ci;
  Thread.CurrentThread.CurrentCulture = ci;
  </code></pre>
  
  <p>I then take a date string that is also passed in on the URL and convert it to a DateTime.  Depending on the culture the date will be passed in as mm/dd/yyyy or dd/mm/yyyy.</p>
  
  <p>I parse the date strings with the following code:</p>
  
  <pre><code>DateTime DateTimeObject;
  bool validDate = DateTime.TryParse(DateStringFromURL, Thread.CurrentThread.CurrentCulture, DateTimeStyles.None, out DateTimeObject);
  </code></pre>
  
  <p>The TryParse works for most cultures and out comes a valid datetime object.  A problem arises with en-ca and fr-ca though.  If the wrong format is passed in, the datestring does not parse correctly.</p>
  
  <p>The following shows which format .NET seems to expect for each culture:</p>
  
  <pre><code>         dd/MM/yyyy    MM/dd/yyyy
  EN-CA      Valid        Invalid
  FR-CA     Invalid        Valid
  </code></pre>
  
  <p>EDIT:
  To be more exact here are the examples causing me problems:</p>
  
  <p>For EN-CA:</p>
  
  <pre><code>DateTime.Parse("26/08/2014") //VALID
  DateTime.Parse("08/26/2014") //EXCEPTION THROWN
  </code></pre>
  
  <p>For FR-CA:</p>
  
  <pre><code>DateTime.Parse("26/08/2014") //EXCEPTION THROWN
  DateTime.Parse("08/26/2014") //VALID
  </code></pre>
  
  <p>This is backwards from how other systems treat this culture's date formatting.</p>
  
  <p>Why are the formats seemingly backwards?
  Is this a bug with .NET 4.5?</p>
  
  <p>Any and all help would be appreciated, thanks.</p>
  
  <p>NOTE:  .NET Version 4.5 </p>