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

Short date culture fix #349

Merged
merged 4 commits into from
Sep 5, 2024

Conversation

digitaldirk
Copy link
Contributor

@digitaldirk digitaldirk commented Sep 4, 2024

Previously were hardcoded to .ToString("dd/MM/yyyy") which could be confusing for some users.

For example: currently a date would show: 02/09/2024, but now it would show as 9/2/2024 for the en-US culture

Previously was hardcoded to .ToString("dd/MM/yyyy") which could be confusing for some users.
Previously was hardcoded to .ToString("dd/MM/yyyy") which could be confusing for some users.
Previously was hardcoded to .ToString("dd/MM/yyyy") which could be confusing for some users.
@linkdotnet
Copy link
Owner

Thanks for the PR @digitaldirk !

Two small things:

  1. The Archive-Page also has some date handling. To be aligned, the change has to be made there as well.
  2. (Have to check later on my machine, just a hunch): The Unit tests (that involve dates) might break now as they don't have any culture set. That would be probably a good idea.

@digitaldirk
Copy link
Contributor Author

I will make some more changes and sorry I should have been more proactive on the tests (quickly did this PR on web)

@linkdotnet
Copy link
Owner

Nahhh don’t worry - given that all tests are green, they had some implicit assumptions or behavior.

@digitaldirk
Copy link
Contributor Author

ShouldPublishScheduledBlogPosts failed but that also fails on a fresh pull of master branch.

Think I'm all done :)

@linkdotnet
Copy link
Owner

ShouldPublishScheduledBlogPosts I guess it doesn't fail on CI because of invariant culture.

@linkdotnet
Copy link
Owner

Thanks for your efforts - I will merge the PR

@linkdotnet linkdotnet merged commit 25535ab into linkdotnet:master Sep 5, 2024
1 check passed
@digitaldirk digitaldirk deleted the short-date-culture-fix branch September 6, 2024 02:19
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.

2 participants