Skip to content

Releases: shivam091/unit_measurements

v5.19.0

12 Jan 17:02
1faac75
Compare
Choose a tag to compare

What's new

  • Added US Customary units for square foot (sq_ft), square mile (sq_mi), and square chain (sq_ch).

What's changed

  • Changed symbol of units cb (M) and cb (US) to metric_cb and us_cb in length.
  • Changed symbol of unit hp (M) to metric_hp in power.
  • Changed symbol of unit cwt (US) to us_cwt in weight.

v5.18.0

11 Jan 16:09
daee9e7
Compare
Choose a tag to compare

What's new

  • Added unit group for mass flow rate units.
  • Added unit group for volumetric flow rate units.

v5.17.0

14 Dec 17:06
8134cd2
Compare
Choose a tag to compare

What's new

  • Added new units qr, U, and z in length.
  • Added new units qr, fir, and us_qr in weight.
  • Added new units dun, sec, and twp in area.
  • Added new units st, fir, and pot in volume.

What's changed

  • Changed implementation of #units_for! to raise error if the unit system is not defined
    within the unit group.
  • Changed symbol of barleycorn length unit.

v5.16.0

13 Dec 05:24
50f76ec
Compare
Choose a tag to compare

What's new

  • Added planck units and their conversions.

v5.15.0

29 Nov 12:33
41c1618
Compare
Choose a tag to compare

What's new

  • Added .define_conversion_methods method to define conversion helper methods for units.

v5.14.0

27 Nov 14:48
12e56f5
Compare
Choose a tag to compare

What's new

  • Added .define_numeric_methods method to define numeric extension methods for units.

v5.13.0

26 Nov 09:12
d52fd2f
Compare
Choose a tag to compare

What's new

  • Added Measurement#to_primitive to convert the measurement to the primitive unit.
  • Added #cbrt method to calculate cube root of the measurement quantity.
  • Added #sqrt method to calculate square root of the measurement quantity.
  • Aliased #to_primitive method as #in_primitive and #as_primitive.

v5.12.0

25 Nov 13:29
6b52fb1
Compare
Choose a tag to compare

What's new

  • Added MissingPrimitiveUnitError error if user tries to convert measurement to
    the primitive unit but it's not set for the unit group.
  • Aliased #+ method as #add.
  • Aliased #- method as #subtract.
  • Aliased #* method as #times and #multiply.
  • Aliased #/ method as #divide.

v5.11.1

16 Nov 13:50
594e1b0
Compare
Choose a tag to compare

What's changed

v5.11.0

09 Nov 17:28
6aeb4c1
Compare
Choose a tag to compare

What's new

  • Added #systems method to return unit systems within the unit group.
  • Added #ratio method to calculate the ratio between two units.