-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
dotnet/samples
#917Milestone
Description
The following page seems to incorrectly document the en-US pattern for ToLongDateString():
https://docs.microsoft.com/en-us/dotnet/api/system.datetime.tolongdatestring?view=netcore-2.2
When I run:
Console.WriteLine($"CurrentCulture is {CultureInfo.CurrentCulture.Name}.");
Console.WriteLine($"DateTimeFormatInfo.CurrentInfo.LongDatePattern: {DateTimeFormatInfo.CurrentInfo.LongDatePattern}");
Console.WriteLine($"DateTime.Now.ToLongDateString(): {DateTime.Now.ToLongDateString()}");
the output is:
CurrentCulture is en-US.
DateTimeFormatInfo.CurrentInfo.LongDatePattern: MMMM d, yyyy
DateTime.Now.ToLongDateString(): May 15, 2019
However, the doc claims the en-US LongDatePattern is:
For example, for the en-US culture, the standard long date pattern is "dddd, MMMMdd, yyyy"