[Locale] How to get short distance units? #7830
-
I might be missing something obvious here, but is there a way to get the short distance units like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You can use:
The units will change depending on the magnitude of the value you pass in - or are you saying you want to always have the small units, regardless of the magnitude? The code that handles distance is at https://github.com/espruino/BangleApps/blob/master/apps/locale/locale.html#L208, and I guess it might be possible to change it to force it, but we'd also have to change the version in the Espruino firmware. We have
|
Beta Was this translation helpful? Give feedback.
You can use:
The units will change depending on the magnitude of the value you pass in - or are you saying you want to always have the small units, regardless of the magnitude?
The code that handles distance is at https://github.com/espruino/BangleApps/blob/master/apps/locale/locale.html#L208, and I guess it might be possible to change it to force it, but we'd also have to change the version in the Espruino firmware.
We have
date_utils
to provide some extra features on top of locale (https://github.com/esp…