Predloga:Unit area

Iz Wikipedije, proste enciklopedije
Jump to navigation Jump to search
Documentation icon Dokumentacija predloge[predogled] [uredi] [zgodovina] [osveži]

Usage[uredi kodo]

This template displays area measurement units used within various Kategorija:Geobox templates, automatically converting between metric/imperial values. The input must be unformatted numeric values (i.e. without commas, the commas are automatically added to the output).

It can display and convert following units:

  • m2 to sq ft (square metres to square feet) and vice-versa
  • ha to acres (hectares to acres) and vice-versa
  • km2 to sq mi (square kilometres to square miles) and vice-versa

The template has 3 unnamed parameters: {{Unit area| unit| value| round}}. Their meaning is as follows:

  1. unit … obligatory, unit (sqm/m, sqft/ft, ha, acre, sqkm/km, sqmi/mi, slashes delimit alternatives) of the value parameter, it will get displayed first
  2. value … obligatory, numerical value
  3. round … mandatory, number of decimal digits (negative numbers can be used for rounded figures); if not specified 0 is assumed

Examples[uredi kodo]

  • {{Unit area|sqkm|1000}}: 1.000 km2
  • {{Unit area|sqmi|1000.25|25}}: 1.000,25 milj (2.590,64 km2)
  • {{Unit area|km|1000|-2}}: 1.000 km2
  • {{Unit area|acre|1000.25|1}}: 1.000,25 arov (404,8 ha)
  • {{Unit area/peskovnik|sqkm|1000}}: 1.000 km2
  • {{Unit area/peskovnik|sqmi|1000,25|25}}: 2.590,64 km2
  • {{Unit area/peskovnik|km|1000|-2}}: 1.000 km2
  • {{Unit area/peskovnik|acre|1000,25|1}}: 1.000,25 arov (404,8 ha)

See also[uredi kodo]

  • {{convert}} for general conversions