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

Fixed issue 238 - Change DefaultDateTimeHumanizeStrategy to turn 60 min ... #278

Closed
wants to merge 3 commits into from

Conversation

preetksingh80
Copy link
Contributor

...to one hour not 45, #238

@@ -71,7 +71,7 @@ public void MinutesAgo(int minutes, string expected)
[InlineData(1, "et minut fra nu")]
[InlineData(10, "10 minutter fra nu")]
[InlineData(44, "44 minutter fra nu")]
[InlineData(45, "en time fra nu")]
Copy link
Member

Choose a reason for hiding this comment

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

Add 60 minutes for all languages please as that's currently missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cool will do that today

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry MehdiK didn't get that. I have added the 60 minutes to the strategy it self hence it now works for all languages.

Copy link
Member

Choose a reason for hiding this comment

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

Correct. Previously the logic was to return "an hour" for 45 minutes and we had test coverage for that in all locales. The code is now changed/fixed to return "one hour" for 60 minutes but we no longer have unit tests for that in any of the other locales. Just need to fix the tests to reflect the change. Thanks.

@MehdiK
Copy link
Member

MehdiK commented May 23, 2014

Add your PR to the release notes + explaining the breaking change.

preet and others added 2 commits May 27, 2014 15:01
updated release notes with [Humanizr#278](Humanizr#278): Added "60 minutes" to "an hour ago" test cases for all locals
@preetksingh80
Copy link
Contributor Author

Hi @MehdiK, I have updated the release notes and the pull request is : #278: Added "60 minutes" to "an hour ago" test cases for all locals

@@ -33,6 +33,9 @@ public string Humanize(DateTime input, DateTime comparisonBase)
if (ts.TotalMinutes < 45)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This condition is not needed any more, as it also included in the next condition < 60.
We should remove it.

MehdiK pushed a commit that referenced this pull request May 27, 2014
updated release notes with [#278](#278): Added "60 minutes" to "an hour ago" test cases for all locals
MehdiK added a commit that referenced this pull request May 27, 2014
@MehdiK
Copy link
Member

MehdiK commented May 27, 2014

This is now rebased and pushed.

Great catch @mexx. It's fixed.

@MehdiK
Copy link
Member

MehdiK commented Jun 22, 2014

This is now released to NuGet as v1.27.0. Thanks for your contribution.

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