Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds support for reading time estimate ranges (e.g., "5–7 minutes", "19 to 23 minutes").
Two new settings:
estimate_range
[default: 15]: The percentage range for the reading time range estimate (e.g., ±15%).range_str
[default: –]: The string that joins the low and high estimates (e.g., "–", "-", " to ").Two new format variables:
{minutes_short_range}
: Same as{minutes_short_count}
but gives a range joined byrange_str
(e.g. "11–15"){minutes_long_range}
: Same as{minutes_long_count}
but gives a range joined byrange_str
(e.g., "05 to 07")The estimate is calculated as the normal reading time estimate ± the
estimate_range
percent, so a 15% range would give you reading time minus 15% for the low estimate and plus 15% for the high estimate.If the range has the same values for the low and high estimate it will return the count instead (e.g,. "1–1" returns "1") and will appropriately match the
{minutes_text}
. If the range floors out at 0, then also return the count instead.I did not implement any support for seconds here, as it added complexity for spurious precision of dubious utility—"13 minutes 16 seconds to 17 minutes 56 seconds" doesn't add much over (13 to 18 minutes).