Title: naturaldelta with negative seconds loses precision and doesn't match naturaltime · Issue #18 · python-humanize/humanize · GitHub
Open Graph Title: naturaldelta with negative seconds loses precision and doesn't match naturaltime · Issue #18 · python-humanize/humanize
X Title: naturaldelta with negative seconds loses precision and doesn't match naturaltime · Issue #18 · python-humanize/humanize
Description: What did you do? I passed a small negative integer value to naturaldelta, it reports "a day". What did you expect to happen? I expect naturaldelta to roughly match naturaltime. Else, if negative values are not supported, it should be doc...
Open Graph Description: What did you do? I passed a small negative integer value to naturaldelta, it reports "a day". What did you expect to happen? I expect naturaldelta to roughly match naturaltime. Else, if negative va...
X Description: What did you do? I passed a small negative integer value to naturaldelta, it reports "a day". What did you expect to happen? I expect naturaldelta to roughly match naturaltime. Else, if n...
Opengraph URL: https://github.com/python-humanize/humanize/issues/18
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"naturaldelta with negative seconds loses precision and doesn't match naturaltime","articleBody":"### What did you do?\r\nI passed a small negative integer value to `naturaldelta`, it reports \"a day\".\r\n\r\n### What did you expect to happen?\r\nI expect `naturaldelta` to roughly match `naturaltime`. Else, if negative values are not supported, it should be documented.\r\n\r\n### What actually happened?\r\n```python\r\nimport humanize\r\n\r\nprint(humanize.naturaldelta(-1))\r\nprint(humanize.naturaltime(-1))\r\n```\r\nshows:\r\n```\r\na day\r\na second ago\r\n```\r\n\r\n\r\n### What versions are you using?\r\n\r\n* OS: `Linux LCARS2 5.17.4-200.fc35.x86_64 #1 SMP PREEMPT Wed Apr 20 15:37:53 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux`\r\n* Python: 3.9.12\r\n* Humanize: 4.1.0\r\n","author":{"url":"https://github.com/Dapid","@type":"Person","name":"Dapid"},"datePublished":"2022-05-12T14:19:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/18/humanize/issues/18"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8efa25d5-e1d6-2987-fd54-b5702ac7ed54 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E3E8:25F50E:7E7B72:A8AE7D:6A5560B1 |
| html-safe-nonce | cf3dd2d51bb186694aa95e89841ec551f56e195fcbfbd885f2112e1b9d947cfb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFM0U4OjI1RjUwRTo3RTdCNzI6QThBRTdEOjZBNTU2MEIxIiwidmlzaXRvcl9pZCI6IjI3MTA5MTM0NTQxMzE0NzA1MTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6b17fe4f37ed36e0a6e6ff84ecfe1e2a4ba481fea02698ef1e931296abfed0a0 |
| hovercard-subject-tag | issue:1234058745 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-humanize/humanize/18/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c9cef5347730f7cf1da2d21654262cdd6a981947e769074999bee55e28485c1b/python-humanize/humanize/issues/18 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c9cef5347730f7cf1da2d21654262cdd6a981947e769074999bee55e28485c1b/python-humanize/humanize/issues/18 |
| og:image:alt | What did you do? I passed a small negative integer value to naturaldelta, it reports "a day". What did you expect to happen? I expect naturaldelta to roughly match naturaltime. Else, if negative va... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Dapid |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| turbo-cache-control | no-preview |
| go-import | github.com/python-humanize/humanize git https://github.com/python-humanize/humanize.git |
| octolytics-dimension-user_id | 62149795 |
| octolytics-dimension-user_login | python-humanize |
| octolytics-dimension-repository_id | 466683324 |
| octolytics-dimension-repository_nwo | python-humanize/humanize |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 466683324 |
| octolytics-dimension-repository_network_root_nwo | python-humanize/humanize |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8201d0b7bc32164c4662de52242e463a356df543 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width