docs icon indicating copy to clipboard operation
docs copied to clipboard

The MMM and MMMM formats may include genitive names.

Open geniuszxy opened this issue 1 year ago • 2 comments

Summary

According to this question: https://stackoverflow.com/questions/78446297/why-is-the-month-abbreviated-differently-when-the-date-format-includes-a-slot-fo, the MMM and MMMM formats may retrieve from the genitive names if there is a d or dd in the format string.


Internal previews

📄 File 🔗 Preview link
docs/fundamentals/runtime-libraries/system-globalization-datetimeformatinfo.md System.Globalization.DateTimeFormatInfo class
docs/standard/base-types/custom-date-and-time-format-strings.md Custom date and time format strings

geniuszxy avatar May 09 '24 05:05 geniuszxy

@dotnet-policy-service agree

geniuszxy avatar May 09 '24 05:05 geniuszxy

Ping @adegeo for review

BillWagner avatar Jun 03 '24 20:06 BillWagner

@tarekgh Could you review this?

gewarren avatar Sep 05 '24 02:09 gewarren

The changes here look good to me. Can we add extra comment to the changes telling Genitive month names will be selected if the d or dd shows in the formatting date pattern? https://github.com/tarekgh/runtime/blob/202f26b3fa293187c35f530a56751e791ebb4ca9/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeFormat.cs#L377

tarekgh avatar Sep 05 '24 17:09 tarekgh

@tarekgh, I made some minor changes to the description of MMM and MMMM in the custom date and time format strings to tell how genitive name is selected, please take a view.

geniuszxy avatar Sep 09 '24 06:09 geniuszxy