Table, provided by this module

This project is not covered by Drupal’s security advisory policy.

Units module provides very simple API for working with unit types collections. This module introduces ability to create units and make conversions between them.

Units 7.x

There has been a major code rewrite before introducing 7.x version. Now measures and units are represented as 2 new entity types. Module depends on:

Features

  • Integrates with Features module - you can export/import your measures and units among Drupal instances;
  • Fields - you can attach any arbitrary fields to units on per measure basis.
  • Entity Translation - then you can translate fields attached to your units
  • Currency - integrates with Currency module, so the currencies become available within Unit module.
  • Pre-created common measures and units - a set of common measures (and common units within them) are shipped within a Unit submodule. You only tick the checkbox and do not have to insert them by typing in all the stuff.
  • Extendable conversion logic - out of the box the module can only convert simple units (those, that can be converted by multiplication) and temperature. However, it is designed to be extendable with CTools plugin to support more sophisticated logic, if need be.

Modules that integrate with Units:

  • Units module is bundled with Currency Units module that implements currencies provided by Currency API
  • UnitsAPI starting from 25 Jan 2010 should make additional common units available
  • Measured Value Field - allows you to attach values measured in some units to your nodes, taxonomy terms, etc, and then output the entered measured value in any other unit.
  • Units UI show factors is a small module that displays conversion factor on the overview of units.

API Documentation

Please see API.txt bundled with the module.

Project information

Releases