Drupal is a registered trademark of Dries Buytaert
Release: Drupal 10.3.6 Update released for Drupal core (10.3.6)! Release: Drupal 11.0.5 Update released for Drupal core (11.0.5)! Release: Drupal 10.2.9 Update released for Drupal core (10.2.9)! Release: Drupal 10.2.10 Update released for Drupal core (10.2.10)! Release: Drupal 10.3.7 Update released for Drupal core (10.3.7)! Release: Drupal 11.0.6 Update released for Drupal core (11.0.6)! Release: Drupal 10.3.8 Update released for Drupal core (10.3.8)! Release: Drupal 11.0.7 Update released for Drupal core (11.0.7)! Module Revived: Translation Management Tool 8.x-1.19 Module tmgmt updated after 7 months of inactivity (8.x-1.19). Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs.

This module provides an API for storing and manipulating physical measurements. It also supports unit conversions.

Features

Supported measurement types:

  • Area
  • Length
  • Temperature
  • Volume
  • Weight

Provided field types:

  • Physical measurement: Stores a single measurement and its unit.
  • Physical dimensions: Stores the length/width/height measurements and their unit.

Other features:

  • Language-specific number input and formatting
  • Value objects with support for bcmath-based arithmetic.

Drupal 9 & 10 & 11

Installation

Physical should only be installed via Composer. The zip files on this page are provided for informative purposes only.

Drupal 9 or newer is required.

Example:
use Drupal\physical\Weight;
use Drupal\physical\WeightUnit;

$weight = new Weight('100', WeightUnit::KILOGRAM);
$other_weight = new Weight('120', WeightUnit::KILOGRAM);
// Add the two weights together then express them in pounds.
$new_weight = $weight->add($other_weight)->convert(WeightUnit::POUND);

Incompatibility notes

Physical 1.3+ is incompatible with Commerce versions prior to 2.34 (See https://www.drupal.org/project/physical/issues/3345698#comment-15019339).

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

1 tracked project depends on this one

Activity

Tracked releases
1
Tracked since
Oct 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
8.x-1.5 Stable Oct 29, 2024