Releases: shivam091/unit_measurements
Releases · shivam091/unit_measurements
v5.19.0
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)
andcb (US)
tometric_cb
andus_cb
inlength
. - Changed symbol of unit
hp (M)
tometric_hp
inpower
. - Changed symbol of unit
cwt (US)
tous_cwt
inweight
.
v5.18.0
v5.17.0
What's new
- Added new units
qr
,U
, andz
inlength
. - Added new units
qr
,fir
, andus_qr
inweight
. - Added new units
dun
,sec
, andtwp
inarea
. - Added new units
st
,fir
, andpot
involume
.
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
v5.15.0
v5.14.0
v5.13.0
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
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
What's changed
- Moved
BaseError
to base file for removing uninitialized constant error in reverse dependencies viz.
unit_measurements-rails and
composite_unit_measurements.