Bug 533 - System.DateTime.ToLongDateString() returns wrong format in (most/all?) cultures
Summary: System.DateTime.ToLongDateString() returns wrong format in (most/all?) cultures
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: master
Hardware: All All
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on: 4782
  Show dependency tree
Reported: 2011-08-30 06:12 UTC by Joern Rohrbach
Modified: 2012-05-15 13:39 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Joern Rohrbach 2011-08-30 06:12:26 UTC
System.DateTime.ToLongDateString() returns the date as "30. August 2011" in stead of "Dienstag, 30. August 2011" in culture de-DE and de-CH (the day name is missing). The same problem occurs with System.DateTime.ToString("D") or Format.String("{0:D}", DateTime.Now).

Is it a iOS or MonoTouch Runtime Problem (i have not tested it on iPhone)?
Comment 1 Sebastien Pouliot 2011-08-30 08:24:40 UTC
This is a Mono class library bug (2.11/master does the same*) and likely an old one (Mono 2.6.7 also has the same* behavior).

* not showing the day name
Comment 2 Sebastien Pouliot 2011-09-09 11:07:04 UTC
This is a culture-related bug (likely bad entries in the tables). The "MMMM d, yyyy" pattern is being used instead of the "dddd, dd MMMM yyyy".

A workaround is to use the pattern yourself, e.g.

Console.WriteLine (DateTime.UtcNow.ToString ("dddd, dd MMMM yyyy"));

-> class lib
Comment 3 Marek Safar 2012-05-15 13:39:20 UTC
Fixed in master