title: DateTime format and neutral culture
body: <p>According to documentation <a href="https://msdn.microsoft.com/en-us/library/5hh873ya(v=vs.100).aspx" rel="nofollow noreferrer">Formatting Date and Time for a Specific Culture</a></p>
  
  <blockquote>
    <p>The <code>DateTime</code> structure provides methods that allow your applications to perform culture-sensitive operations on a DateTime type. An application can use the <code>DateTimeFormatInfo</code> class to format and display a DateTime type based on culture. For example, using <code>DateTimeFormatInfo.ShortDatePattern</code>, the date February 1, 2001 can be formatted as 2/1/2001 for the English (United States), "en-US", culture and 01/02/2001 for the English (United Kingdom), "en-GB", culture.</p>
    
    <p>An <code>DateTimeFormatInfo</code> object can be created for a <strong>specific</strong> culture or for the <strong>invariant</strong> culture, but not for a <strong>neutral</strong> culture. <strong>A neutral culture does not provide enough information to display the correct date format.</strong> An exception is thrown if the application attempts to create a <code>DateTimeFormatInfo</code> object using a neutral culture.</p>
  </blockquote>
  
  <p>But how come the following does not throw an exception? And where does it get information on how to format date, since specific culture was not specified?</p>
  
  <p><code>Console.WriteLine(DateTime.Now.ToString("d", new CultureInfo("fr")));</code></p>
  
  <p><strong>Update</strong>:</p>
  
  <p>You can create instances of specific culture or neutral culture,
  for example <code>new CultureInfo("fr-FR")</code> or <code>new CultureInfo("fr")</code>.</p>
  
  <p>In <a href="https://msdn.microsoft.com/en-us/library/zdtaw1bw(v=vs.110).aspx" rel="nofollow noreferrer"><code>DateTime.ToString</code></a> method it says</p>
  
  <blockquote>
    <p>The ToString(String) method returns the string representation of a date and time value in a specific format that uses the formatting conventions of the current culture; for more information, see <code>CultureInfo.CurrentCulture</code>.</p>
  </blockquote>
  
  <p>And <a href="https://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.currentculture(v=vs.110).aspx" rel="nofollow noreferrer">CultureInfo</a> documentation says</p>
  
  <blockquote>
    <p>The CultureInfo object that is returned by this property and its associated objects determine the default format for dates, times, numbers, currency values, the sorting order of text, casing conventions, and string comparisons.</p>
  </blockquote>
  
  <p><strong>Update 2</strong></p>
  
  <p>Yes, so the MSDN page referenced above is outdated and the framework behaviour has changed.</p>
  
  <p>I have the following code</p>
  
  <pre><code>var culture = new CultureInfo("en");
  Console.WriteLine(DateTime.Now.ToString("d", culture));
  </code></pre>
  
  <p>When I run this code targeting .NET 3.0 I get the following exception. But it works well on .NET 4.6.2.</p>
  
  <pre><code>An unhandled exception of type 'System.NotSupportedException' occurred in mscorlib.dll
  
  Additional information: Culture 'en' is a neutral culture. It cannot be used in formatting and parsing and therefore cannot be set as the thread's current culture.
  </code></pre>
  
  <p>So, going back to my original question. When I use neutral culture, where does the information about <code>DateTime</code> format come from?</p>