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

Bug in time calculation on rails version 7.1.4.1 #137

Open
SweetMyCher opened this issue Oct 21, 2024 · 1 comment
Open

Bug in time calculation on rails version 7.1.4.1 #137

SweetMyCher opened this issue Oct 21, 2024 · 1 comment
Labels

Comments

@SweetMyCher
Copy link

Strange behavior when calculating time.
The bug is reproduced on rails version 7.1.4.1, ruby 3.3.4
When calling the distance_of_time((3.days + 4.hours).to_f) method, an incorrect value is displayed.
As if hours are substituted for minutes:
Result:"3 days and 3 hours"
More examples:
distance_of_time((4.days + 1.hours).to_f)
Result: "4 days and 4 hours"

distance_of_time((6.days + 23.hours).to_f, locale: :en)
Result: "6 days and 6 hours"

Version of gem: 5.3.3

On version rails 7.0.8.4 everything works correctly

@dblock
Copy link
Collaborator

dblock commented Oct 21, 2024

Try adding CI on the failing version to https://github.com/radar/distance_of_time_in_words/blob/master/.github/workflows/ruby.yml and let's see if any tests fail?

@dblock dblock added the bug? label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants