Skip to content

Conversation

rpetrusha
Copy link

Updated culture-sensitive formatting information

This PR:

  • Moves common text shared by the four culture-sensitive date time formatting methods to an include file.
  • Corrects individual culture-sensitive format patterns.
  • Notes that format patterns are dependent on .NET implementation, OS, and user customization.

Related to #2455

Depends on dotnet/samples#917

@rpetrusha rpetrusha added the 🚧 Hold for related PR Indicates a PR can only be merged when other related PRs are merged (see comments for links) label May 17, 2019
@rpetrusha rpetrusha added this to the May 2019 milestone May 17, 2019
@rpetrusha rpetrusha self-assigned this May 17, 2019
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM @rpetrusha

I had one observation, but I thought your change was what you intended.

you can :shipit: when ready.

> [!NOTE]
> The string returned by the <xref:System.DateTime.ToShortDateString%2A> method is culture-sensitive. It reflects the pattern defined by the current culture's <xref:System.Globalization.DateTimeFormatInfo.ToShortDateString?displayProperty=nameWithType> method. For example, for the en-US culture, the standard short date pattern is "M/d/yyyy"; for the de-DE culture, it is "dd.MM.yyyy"; for the ja-JP culture, it is "yyyy/MM/dd". Note that its value can vary depending on the .NET implementation and its version, the operating system and its version, and user customization.

[!INCLUDE[japanese-era-note](~/includes/calendar-era.md)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that this is a different include than the one you added above. I think that is what you meant, but I wanted to point it out

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this, @BillWagner! This is a copy-and-paste error; I'd in fact meant to link to the new include file that I added in this PR.

> [!NOTE]
> The string returned by the <xref:System.DateTime.ToShortTimeString%2A> method is culture-sensitive. It reflects the pattern defined by the current culture's <xref:System.Globalization.DateTimeFormatInfo.ShortTimePattern?displayProperty=nameWithType> property. For example, for the en-US culture, the standard short time pattern is "h:mm tt"; for the de-DE culture, it is "HH:mm"; for the ja-JP culture, it is "H:mm". Note that its value can vary depending on the .NET implementation and its version, the operating system and its version, and user customization.

[!INCLUDE[japanese-era-note](~/includes/calendar-era.md)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above.

@rpetrusha rpetrusha merged commit e00a4d4 into dotnet:master May 21, 2019
@rpetrusha rpetrusha deleted the culture-formatting branch June 10, 2019 22:52
@mairaw mairaw removed the 🚧 Hold for related PR Indicates a PR can only be merged when other related PRs are merged (see comments for links) label Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants