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

ReadingTime calculation should never be under one minute #1286

Closed
caendesilva opened this issue Mar 14, 2023 · 0 comments · Fixed by #1285
Closed

ReadingTime calculation should never be under one minute #1286

caendesilva opened this issue Mar 14, 2023 · 0 comments · Fixed by #1285
Labels
bug Something isn't working

Comments

@caendesilva
Copy link
Member

caendesilva commented Mar 14, 2023

Issue Description

Currently, the ReadingTime calculation in can return 0 minutes, which is not accurate as even a short post would at least be closer to 1 minute to read. Therefore, we should update the calculated minutes time formatting to always be at least one minute.

Steps to Reproduce

  1. Create a post with a very short amount of content (e.g. a few sentences).
  2. Run the ReadingTime calculation on the post.
  3. Note that the calculated time may be 0 minutes.

Expected Behavior

The ReadingTime calculation should always return a minimum of 1 minute, even for very short posts.

Actual Behavior

The ReadingTime calculation can return 0 minutes, which is not accurate.

Possible Solution

Update the ReadingTime calculation to always add 1 to the calculated minutes time.

Credit

Thanks to @rgasch for bringing this issue to my attention.

@caendesilva caendesilva added the bug Something isn't working label Mar 14, 2023
@caendesilva caendesilva changed the title Change the ReadTime calculation to never be under one minute ReadTime calculation should never be under one minute Mar 14, 2023
@caendesilva caendesilva changed the title ReadTime calculation should never be under one minute ReadingTime calculation should never be under one minute Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant