Units & measurement conversion
Showing the same quantity in the units people expect, such as miles, Celsius, or A4, while keeping one canonical value underneath.
What it is
Units and measurement conversion means presenting the same quantity in the units a market or user expects: kilometres or miles, kilograms or pounds, Celsius or Fahrenheit, and A4 or US Letter where a physical page choice is involved. Keep one canonical value and unit in storage, then convert for input and display.
Reach for it anywhere a measurement drives comprehension or action, from weather and fitness to shipping dimensions. Intl.NumberFormat can localize a unit label and number, but it does not convert the numeric value. Do that conversion explicitly before formatting, and let users override the locale-derived default.
Gotcha: units are not all simple scale factors. Temperature conversion includes an offset, and A4 versus US Letter changes page geometry rather than just its label. Never relabel an unchanged number as a converted measurement. NASA lost the Mars Climate Orbiter in 1999 exactly that way: one team supplied thrust in pound-force seconds while the navigation software expected newton-seconds, and nothing in the numbers looked wrong.
Ask AI for it
Add locale-aware measurement display with an explicit user preference for metric, US customary, or UK units. Store every quantity as a value plus a canonical unit, convert with named functions before rendering, and format the result with Intl.NumberFormat using style: 'unit', the required unit identifier such as 'mile' or 'celsius', and unitDisplay: 'short'. Implement Celsius to Fahrenheit as F = C * 9 / 5 + 32, treat A4 and US Letter as separate page-size presets, and add round-trip tests so saving a displayed value does not drift.