Skip to content

fix(history-queries): use uiLang for dates and capitalize first letter#2018

Open
alexpnrv wants to merge 1 commit intoempathyco:mainfrom
alexpnrv:fix/myhistory-uilang-uppercase
Open

fix(history-queries): use uiLang for dates and capitalize first letter#2018
alexpnrv wants to merge 1 commit intoempathyco:mainfrom
alexpnrv:fix/myhistory-uilang-uppercase

Conversation

@alexpnrv
Copy link

Problem:
MyHistory was displaying dates using the lang parameter from SnippetConfig. In languages like Spanish, toLocaleDateString returns lowercase day names, so UI dates looked incosistent.

Solution:

  • Use the uiLang parameter from SnippetConfig for all UI date formatting
  • Capitalize the first character of the date string to ensure proper display in languages where toLocaleDateString does not automatically capitalize.
  • Fallback to props.locale if uiLang is not provided.

Before:
miércoles, 19 de octubre de 2022

After:
Miércoles, 19 de octubre de 2022

Notes:

  • No visual or functional changes outside of the date capitalization and locale usage.
  • Fully backwards compatible; Englisch and other languages that capitalize automatically remain unaffected.

@alexpnrv alexpnrv requested a review from a team as a code owner February 27, 2026 23:36
@victorcg88 victorcg88 added duplicate This issue or pull request already exists contributors Pull Request from external contributors labels Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributors Pull Request from external contributors duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants