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

Minutes calculation cannot be 0 #20

Open
mtaltavull opened this issue Feb 22, 2024 · 3 comments
Open

Minutes calculation cannot be 0 #20

mtaltavull opened this issue Feb 22, 2024 · 3 comments

Comments

@mtaltavull
Copy link

@mtownsend5512 Do you recall if there is a reason that the minutes calculation is set to 1 if it is < 1?

There are times when a short article will have a less than a minute read time. If displaying both minutes and seconds from the estimation, it incorrectly displays as something like "1 minute 45 second read time" instead of "45 second read time".

@mtownsend5512
Copy link
Owner

It mostly came from a pragmatic approach to what the package is trying to do. Normally, people don't concern themselves with the time it would take to read a Tweet vs when they open up an article.

@mtaltavull
Copy link
Author

Thanks @mtownsend5512. For context, I created a Drupal module that uses this package to estimate the read time for content. A user opened up an issue related to this. By default, only the minutes is displayed, but there is the option to display the seconds as well.

I'll think about if this should be fixed in the Drupal module. Or maybe we should no longer support displaying seconds.

@mtownsend5512
Copy link
Owner

@mtaltavull If you are interested in a PR to fix this issue in this repo I'd be happy to take a look at it

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