mirror of
https://github.com/chubin/wttr.in.git
synced 2024-10-05 01:42:07 +02:00
Ensure M
enables metric
It seems reasonable, per the documentation (under the section, "Weather Units"), that `?M` would enable metric ("metric (SI), but show wind speed in m/s") all by itself. > By default the USCS units are used for the queries from the USA and the metric system for the rest of the world. You can override this behavior... > ... > `curl wttr.in/Amsterdam?M` # metric (SI), but show wind speed in m/s In the USA, we have to pass `?m&M` (`https://wttr.in/?m&M`) to get metric and meters/second. If we just pass `?M`, we get USCS units for everything else and windspeed in meters/second.
This commit is contained in:
parent
e5a932be23
commit
c7cb67f841
@ -84,6 +84,7 @@ def parse_query(args):
|
||||
if 'm' in q:
|
||||
result['use_metric'] = True
|
||||
if 'M' in q:
|
||||
result['use_metric'] = True
|
||||
result['use_ms_for_wind'] = True
|
||||
if 'u' in q:
|
||||
result['use_imperial'] = True
|
||||
|
Loading…
Reference in New Issue
Block a user