Skip to content
Arthur Guiot edited this page Sep 8, 2018 · 8 revisions

TheoremJS can help you convert units using the t.units or the t.convert method.

Supported Units

  • Area
    • mm2
    • cm2
    • dm2
    • m2
    • dam2
    • hm2
    • ha
    • km2
    • in2
    • ft2
    • yd2
    • mi2
  • Distance / Length
    • mm
    • cm
    • dm
    • m
    • dam
    • hm
    • km
    • yd
    • ft
    • mi
    • in
    • li
    • au Astronomical unit
    • ly Light year
    • Nm Nautical mile
  • Mass
    • mg
    • cg
    • dg
    • g
    • dag
    • hg
    • kg
    • t
    • oz
    • lb
  • Speed
    • m/s
    • km/h
    • m/h ⚠️ Miles / h not meters / h
    • knot
    • ft/s
  • Temperature
    • c
    • f
    • k
  • Time
    • ms
    • s
    • m
    • h
    • d
    • w
    • mo
    • y
  • Volume
    • mm3
    • ml
    • cm3
    • cl
    • dl
    • dm3
    • l
    • hl
    • m3
    • dam3
    • hm3
    • km3
    • gal
    • floz

Example

t.units(3, "volume", "l", "mm3") // 3e+6 => BigNumber

t.convert(5, "area", "mi2", "km2") // ~ 12.95 => BigNumber

t.units(1, "speed", "m/s", "km/h") // 3.6 => BigNumber

t.convert(20, "speed", "m/h", "km/h") // ~ 32.19 => BigNumber
Clone this wiki locally