question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Refactor humanize() method, expand usage, fix edge cases

See original GitHub issue

.humanize() is getting kind of long and could do with refactoring. We’d also like to explore allowing other inputs such as date and timedelta objects.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
anishnyacommented, May 7, 2022

Hi @olivebay, we’re currently evaluating various ways to improve this. The current method for calculating relative dates relies upon fairly basic math operations and assumptions. Our concern with implementing something more accurate and precise would be reduced performance for batch processing jobs. Most likely we’d either introduce a flag or new method for more precise results (similar to https://www.timeanddate.com/date/duration.html).

1reaction
jadchaarcommented, Mar 2, 2021

Once this is fixed, we should revert coverage requirement to 100%: https://github.com/arrow-py/arrow/issues/749.

Read more comments on GitHub >

github_iconTop Results From Across the Web

7 Code Refactoring Techniques in Software Engineering
Mainly we use this technique to reduce the redundancy (duplication) in our code. This involves class inheritances, hierarchy, creating new ...
Read more >
5 Refactoring Techniques You Can Use To Improve Your ...
Discover five refactoring techniques to improve your existing code and the primary benefits of each method.
Read more >
sails/CHANGELOG.md
- Update boilerplate bootstrap and hook initialize functions. 68, - Disable 'async' dependency when generated the expanded starter app, to avoid confusion. (Can ......
Read more >
golang-github-prometheus-prometheus-2.7.1-bp152.3.41
#6880 * Remote Write: Fixed blocked resharding edge case. ... there might be some increase in memory usage, CPU usage, or query latency....
Read more >
CFWheels Core
... Ruby on Rails that provides fast application development, a great organization system for your code, and is just plain fun to use....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found