Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 1, 2025

The DateTimeFormatInfo.ShortestDayNames property documentation incorrectly claimed it returns "unique" abbreviated day names, but according to the Unicode CLDR specification, shortest day names are defined as single characters which might not be unique.

Changes Made

Documentation Fix:

  • Removed the word "unique" from the XML documentation summary in DateTimeFormatInfo.xml
  • Changed "shortest unique abbreviated day names" to "shortest abbreviated day names"

Why This Fix Is Necessary

The documentation should not promise "unique" because:

  1. The underlying Unicode CLDR specification defines shortest day names as single characters, which could result in duplicates
  2. Future .NET versions might change to follow the CLDR more strictly
  3. Different cultures or implementations might produce non-unique shortest day names
  4. The API specification shouldn't make guarantees that aren't ensured by the underlying standard

As noted by @tarekgh in the issue, this aligns with removing the word "unique" from the documentation to accurately reflect the specification rather than current implementation details.

Fixes #11752.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits September 1, 2025 18:29
Co-authored-by: tarekgh <10833894+tarekgh@users.noreply.github.com>
Co-authored-by: tarekgh <10833894+tarekgh@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] DateTimeFormatInfo.ShortestDayNames does not return "unique" abbreviated day names. Remove incorrect "unique" claim from DateTimeFormatInfo.ShortestDayNames documentation Sep 1, 2025
@Copilot Copilot AI requested a review from tarekgh September 1, 2025 18:34
Copilot finished work on behalf of tarekgh September 1, 2025 18:34
@tarekgh
Copy link
Member

tarekgh commented Sep 1, 2025

@copilot revert the change in the sample code.

Co-authored-by: tarekgh <10833894+tarekgh@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Sep 1, 2025

@copilot revert the change in the sample code.

Sample code changes have been reverted as requested. The examples now show the original output with single characters ("S", "M", "T", etc.) while keeping the documentation fix that removes "unique" from the XML summary. See commit 804997d.

Copilot finished work on behalf of tarekgh September 1, 2025 20:01
@tarekgh tarekgh marked this pull request as ready for review September 1, 2025 20:03
@tarekgh tarekgh requested a review from a team as a code owner September 1, 2025 20:03
@tarekgh
Copy link
Member

tarekgh commented Sep 1, 2025

@adegeo could you please help review this simple change and merge if possible? Thansk!

@gewarren gewarren merged commit 0613573 into main Sep 2, 2025
5 checks passed
@gewarren gewarren deleted the copilot/fix-11752 branch September 2, 2025 00:09
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.

DateTimeFormatInfo.ShortestDayNames does not return "unique" abbreviated day names.
3 participants