Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CultureInfo.InvariantCulture in DateAsText #564

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DFU398
Copy link
Member

@DFU398 DFU398 commented May 8, 2024

Please check if the PR fulfills these requirements

  • I made sure that my code builds
  • I merged the master into this branch before pushing
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce?** (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior? (You can also link to an open issue here)

See #563

What is the new behavior?

closes #563

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications

DateAsText previously used CultureInfo.CurrentCulture by default, now it uses CultureInfo.InvariantCulture instead, so the formatting of the resulting string is different if no other format provider was given.
If formatting for the current culture is needed, CultureInfo.CurrentCulture now needs to be explicitly specified, for example:

new DateAsText(date, CultureInfo.CurrentCulture);
new DateAsText(date, format, CultureInfo.CurrentCulture);

Other information

@DFU398 DFU398 added the Breaking Change Existing signature is changed label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change Existing signature is changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use CultureInfo.InvariantCulture in DateAsText
1 participant