Give a single day figure as one figure, not as a range, in the data for search engines
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
2258c1f280
commit
6c6251a600
3 files changed
+20
-2
No files matched your search
+6
-2
@@ -277,8 +277,12 @@ def _properties(rec):
|
||||
props.append(_pv("Built length", rec["built_km"], "KMT", "kilometres"))
|
||||
days = h.get("days")
|
||||
if isinstance(days, list) and len(days) == 2:
|
||||
props.append(_pv("Usual time to walk it all", f"{days[0]} to {days[1]} days", "DAY", "days",
|
||||
minValue=days[0], maxValue=days[1]))
|
||||
lo, hi = min(days), max(days)
|
||||
if lo == hi: # one figure, not a range: "7 days", never "7 to 7 days"
|
||||
props.append(_pv("Usual time to walk it all", lo, "DAY", "day" if lo == 1 else "days"))
|
||||
else:
|
||||
props.append(_pv("Usual time to walk it all", f"{lo} to {hi} days", "DAY", "days",
|
||||
minValue=lo, maxValue=hi))
|
||||
elif isinstance(days, int):
|
||||
props.append(_pv("Usual time to walk it all", days, "DAY", "days"))
|
||||
if h.get("high_point_m"):
|
||||
|
||||
Reference in new issue
Block a user