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

humanize.naturaldelta() always rounds down #174

Open
qtlunya opened this issue Feb 25, 2024 · 1 comment
Open

humanize.naturaldelta() always rounds down #174

qtlunya opened this issue Feb 25, 2024 · 1 comment

Comments

@qtlunya
Copy link

qtlunya commented Feb 25, 2024

What did you do?

humanize.naturaldelta(10799)

Note that this is exactly one second below 3 hours.

What did you expect to happen?

It should say 3 hours.

What actually happened?

It says 2 hours.

What versions are you using?

  • OS: Debian 12
  • Python: 3.11.2
  • Humanize: 4.9.0

Please include code that reproduces the issue.

The best reproductions
are
self-contained scripts
with minimal dependencies.

print(humanize(10800))  # "3 hours"
print(humanize(10799))  # "2 hours"
@hugovk
Copy link
Member

hugovk commented Feb 25, 2024

Previously reported at the old repo:

But those are closed, so we let's use this new issue.

There's an old PR that started work to fix this, but was never finished:

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

No branches or pull requests

2 participants