def

func:isMetric

isMetric(val: null)

Given an optional value return true if the SI metric system should be used. Return false if the United States customary unit system should be used. The following rules are used:

  • if val is a dict with geoCountry return return false if "US"
  • if number or rec with unit and unit is known to be a US customary unit return false (right now we only check for °F and Δ°F)
  • fallback to locale of hosting server, see Locale

Examples:

isMetric({geoCountry:"US"})  >>  false
isMetric({geoCountry:"FR"})  >>  true
isMetric(75°F)               >>  false
isMetric({unit:"Δ°C"})       >>  true
isMetric()                   >>  fallback to server locale

meta

supertypes

feature

Feature namespace of definitions formatted as feature:name

    func

Axon function