aboutsummaryrefslogtreecommitdiff
path: root/modern/src/common/util/formatter.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/common/util/formatter.js')
-rw-r--r--modern/src/common/util/formatter.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/modern/src/common/util/formatter.js b/modern/src/common/util/formatter.js
index aeacc145..79f51fce 100644
--- a/modern/src/common/util/formatter.js
+++ b/modern/src/common/util/formatter.js
@@ -8,6 +8,7 @@ import {
distanceFromMeters,
distanceUnitString,
speedFromKnots,
+ speedFromKph,
speedUnitString,
volumeFromLiters,
volumeUnitString,
@@ -64,6 +65,8 @@ export const formatAltitude = (value, unit, t) => `${altitudeFromMeters(value, u
export const formatSpeed = (value, unit, t) => `${speedFromKnots(value, unit).toFixed(2)} ${speedUnitString(unit, t)}`;
+export const formatSpeedKph = (value, unit, t) => `${speedFromKph(value, unit).toFixed(2)} ${speedUnitString(unit, t)}`;
+
export const formatVolume = (value, unit, t) => `${volumeFromLiters(value, unit).toFixed(2)} ${volumeUnitString(unit, t)}`;
export const formatHours = (value) => dayjs.duration(value).humanize();