Open captn3m0 opened 3 months ago
Hello @captn3m0 👋🏼
Maybe by using the "threshold" setting https://github.com/markets/jekyll-timeago/pull/24?
Yeah, I was thinking of adapting threshold as well for rounding up (current implementation only rounds down). I'll see if I can work on a PR.
Also, this felt like a bug more than a feature request - "1 year and 12 months" should always be rounded up to 2 years, irrespective of a threshold.
Also, this felt like a bug more than a feature request - "1 year and 12 months" should always be rounded up to 2 years, irrespective of a threshold.
Yes, I kind of agree with that. Is that also happening with no custom threshold at all 🤔?
For reference, all this logic is implemented in this method:
I did try with zero threshold, but just noticed I ran my tests in a repo with _config.yml that has a threshold set.
I'll double check in a clean environment and report back.
It is possible to get results that use "and 4 weeks", or "and 12 months". It would be better to round such usage up.