-
Notifications
You must be signed in to change notification settings - Fork 122
Release History
This is the version for the current nightly build. It includes all work-in-progress since the last release version. It may include experimental and other features that are in a state of flux.
Nov 6, 2018
- Add support for {Gibi|Mebi|Kilo|etc}bits PR 304)
- Inches of Mercury unit of Pressure PR 313)
- Fix Quantity hashcode method. PR 307)
- Added very large units of length: kpc, Mpc, Gpc PR 303)
- Add ZAR and NAD to defaultCurrencySet PR 295)
- Add currencies ZAR and NAD. Add MoneyContext.withAdditionalCurrencies PR 294)
- Make Dimension.parseString/Tuple public PR 293)
- Add units of measure: mm/s (velocity), mm/s^2 (acceleration), ng (mass) PR 280)
- add power density, implement power method PR 297)
- Electron volt as a length unit PR 294)
- Add milliwatt hour energy unit (mWh) PR 284)
- Mass electron volt PR 275)
- add MolarEnergy, implement Energy unimplemented method PR 274)
- Energy electron volt PR 273)
- add ElectricFieldStrength, implement ElectricPotential unimplemented method PR 272)
- Permeability PR 271)
- Adds mass.AreaDensity UOM PoundsPerAcre PR 270)
- add ElectricCurrentDensity and MagneticFieldStrength types PR 269)
- Improvements to precision of Money operations (PR 268)
- Added an implicit conversion from Dimensionless to Double to allow Dimensionless values to be used in places that require a Double (PR 267)
- Added Permeability quantity (PR 271)
- Add mm/s (velocity), mm/s^2 (acceleration), ng (mass) (PR 290)
- Updates to support scala, scala.js and scala native versions
May 20, 2017
- Added Parsecs unit (PR 208)
- Added Solar radius, Nominal Solar radius, Solar Luminosity, and Solar Mass (PR 209)
- Added Torrs and Standard Atmospheres pressure units (PR 210)
- Improvements to Money (PR 217)
- added
Money.rounded
method - modified
Money.toString
to return the full precision amount and currency code - fixed
Money.toFormattedString
to apply proper rounding - added
Money.mapAmount
method - added
Currency.toString
method
- added
- Added
Quantity.rounded
method (PR 217) - Stabilized
toString
output forMoneyContext
andMoneyNumeric
(PR 218) - Added
*
,/
,per
to squantified numbers to improve frequency support (PR 213) - Added rotational dynamics units (MomentOfInertia, AngularAcceleration, Torque) (PR 227)
- Support scala-native (PR 238)
- Added experimental
UnitGroup
(PR 234 and PR 235) - Added experimental
Formatter
(PR 240 and PR 244) - Improved documentation
-
The behavior of the
Money.toString
method has changed. It will no longer round the amount to the decimal places defined in the Currency. It will use the full precision amount. If you need the amount rounded use thetoFormattedString
or thetoString(uom: Currency, format: String)
method. Another option is to first apply the rounded method before calling toString. -
The behavior of the
MoneyContext.toString
andMoneyNumeric.toString
have also changed. If you have user code that depends on these, please review the format of the new output and adjust your code.
Thanks to Doug Hurst and Philip Axelrod for their contributions.
- Make AngularVelocity a derivative of Angle (PR 173)
- Fix typo in ElectricPotential: "mircoVolts" to "microVolts" (PR 175). Note this change technically breaks API backwards compatibility.
- Properly parse temperatures written in scientific notation (PR 183)
- Don't parse multiple degree symbols (°) in temperature (PR 190). Note this change technically breaks backwards compatibility for data parsing.
- Support for AcreFeet volume unit ([PR 201] (https://github.com/typelevel/squants/pull/201))
- Miscellaneous documentation and compiler warning fixes.
Thanks to Shadaj Laddad, Ian McIntosh, and Leif Wickland for their contributions.
Jan 9th, 2017
- Add Rankine to thermal package (PR 161)
- Add
ceil
,floor
, andrint
to Quantity base class (PR 162) - Add Troy mass units (grain, pennyweight, ounce, pound), Carat and Tola (PR 164)
- Add Stone mass unit (PR 166)
Dec 20, 2016
- Add [Money]/[Price] in place of [Price]*[Money] - NOTE the former still exists but is marked as deprecated.
- Add Support for Scala 2.12.
- Moved to the
org.typelevel
organization.
Thanks to Szabolcs Berecz and golem131 for their contributions.
May 10, 2016
- Addition of
Information
andDataRate
dimensions - Integration with Scala.js
- Improvements to Vectors including
- add
map
methods - add
angle
andpolar
methods for extracting the polar coordinates - rename to
SVector
with a factory methods for Double and Quantity based Vectors - better typing and dimensional conversions
- add
- Addition of
Quantity.map
useful for mapping over underlying value without changing the type or units - Addition of
Time
unitNanoseconds
- Improve conversions to and from
Time
andscala.concurrent.Duration
to preserve units - Addition of
Velocity
unitKilometersPerSecond
- Fixed an issue with the
KilometersPerHour
unit - Added ability to initialize Quantities from strings in exponential format
- Addition of
Area.squareRoot
andVolume.cubeRoot
, each returning a Length - Addition of
Length
unitAngstroms
- Addition of
Energy
unitErgs
- Addition of
Power
unitErgsPerSecond
- Update of INR currency symbol to
₹
- Working prototype of generic number support (in
squants.experimental
in the test code) - Add GitHub source code links to scaladocs
- Addition of
AreaDensity
unitsGramsPerSquareCentimeter
andKilogramsPerHectare
- Removed bogus conversion
Irradiance
/Power
->Area
- Addition of
SpectralIrradiance
dimension - Addition of
Irradiance
unitErgsPerSecondPerSquareCentimeter
- Addition of support for OSGi
Thanks to Derek Morr, Rmihael, Florian Nussberger, Ajay Chandran, Gia Bảo, Josh Lemer, Dave DeCaprio and Carlos Quiroz for their contributions.
With the integration of Scala.js, the library needed to be broken down into a few sub projects. This requires a slight change to how the console needs to be loaded. The correct command is now:
sbt squantsJVM/console
Vector has been renamed to SVector and now provides the factory methods for both Quantity and Double based vectors. User code that creates vectors should be modified to use this factory. The improvements to Vectors also removed the various experiments for dimensional conversion. These improvements are significant but still contain experimental API features which are subject to change.
The support for generic numbers will exist only in test code for the project until we move on to 0.7.x development. Prior to that change, a 0.6.x release will be cut that will based on the old (Double) model. The goal will be to fully implement this feature during 0.7.x development.
The new dimension Information
was originally called Storage
.
June 11, 2015
- Enhance Quantity model to preserve the unit used in creating the value
- Rename
UnitMultiplier
trait toUnitConverter
, themultiplier
field toconversionFactor
, and set access level of all fields to protected (see Migration notes) - Rename
QuantityCompanion
toDimension
- Rename
Quantity.valueUnit
tounit
- Rename
MassFlowRate
toMassFlow
- Rename
VolumeFlowRate
toVolumeFlow
- Add
dimension
value to Quantity - Improvements to
TimeIntegral
andTimeDerivative
traits - Addition of
TimeSquared
, an intermediate non-quantity value, andSecondTimeDerivative
,SecondTimeIntegral
traits, all in support of second order time derivatives conversions. - Addition of
Acceleration.analyze()
method - a candidate for a generic SecondTimeDerivative feature. - Addition of
KineticEnergy
method which takesMass
andVelocity
and applies the conversion (Mass, Velocity) => 1/2(Mass * Velocity * Velocity) yielding anEnergy
value. - Addition of
KineticEnergy
method which takesMass
andMomentum
and applies the conversion (Mass, Momentum) => Momentum / (2 * Mass), yielding anEnergy
value. - Addition of
Mass
unitsKilopounds
andMegapounds
- Addition of
PowerRamp
unitsWattsPerMinute
andKilowattsPerMinutes
- Addition of
MassFlow
unitsPoundsPerSecond
,PoundsPerHour
,KilopoundsPerHour
andMegapoundsPerHour
- Addition of
VolumeFlow
unitCubicFeetPerHour
- Addition of
Dimensionless
unitPercent
- Normalize
Temperature
model - Enhance to
UnitOfMeasure
model to include primaryUnit and siUnit - Simplify Json Serializers in
experimental.test
- Removed redundant
toString
methods from a few classes - Update
Length
/Area
/Volume
operations to be unit-sensitive - Rename
CubicMiles
toCubicUsMiles
- Modify constants to use Exp notation where appropriate
- Update Scala versions to 2.11.6 and 2.10.5
- Add support for converting
Quantity
values to aTuple2
and initializing aQuantity
from a Tuple. - Addition of
PressureChange
dimension - Correction of
Bars
/Pascals
conversion factor
Thanks to Steve Barham for his contributions.
The change from UnitMultipler/multiplier
-> UnitConverter/conversionFactor
will only affect user code where new Quantity
or UnitOfMeasure
types have been created. That code should only need to be updated to reflect the new names. Code that only uses built-in quantities and units should not be affected.
Modifications to the TimeIntegral
and TimeDerivative
hide the previously visible change
and time
fields, which are generally not useful in user code, but may affect Quantity implementations. In addition the TimeIntegral./() implementations have been replaced by a standard implementation within the trait.
The ElementaryConstant
value has been moved to the electro
package.
The renaming of Dimension, MassFlow, VolumeFlow, and CubicUsMiles may require user code to be updated.
The update to the Quantity model - to preserve the unit used when creating, and rename valueUnit->unit - may affect some users that were accessing the valueUnit directly. Which should generally not be used directly access by user code. This will affect user code used to create new Dimensions, Quantities and Units.
July 6, 2014
- Add
Price.in
method for directly converting a price to a different currency - Add
Price.toString(unit)
method to support formatting in a specific unit - Add
Money.toString
overload to support formatting in a different currency - Refactor Currencies to be objects rather than vals (no change in usage)
- Add
Currency./
method for creating exchange rates - Add MoneyNumeric
- Add Comparisons for cross-currency Money values (
==#
,!=#
,<#
,<=#
,>#
,>=#
)
- Add
Quantity.toString
overload that supports standard number formatting (ie, "%3.2f") - Add
≈
as another approx operator - Add SquantifiedBigDecimal, remove SquantifiedNumeric
- Factor out common data and behavior to new
QuantityCompanion
trait - implemented for all data types exceptMoney
which currently requires special handling - Implement
String => Quantity
parsing conversions returningTry[Quantity]
for all existing types (see Migration Notes below) - Additional Units:
- ElectricCharge:
MilliampereHours
,MilliampereSeconds
- ElectricCharge:
- Add
unapply
toUnitOfMeasure
trait and deprecate existing extractors in its favor - Json Serialization - experimental, test code only
- Generic Quantity Value - experimental, test code only
- Add support for Scala cross-version builds (2.10 and 2.11) with 2.11.1 as the default
- Fixed
SquareInches.symbol
String parsers no longer return Either[String, Q]
but will return a Try[Q]
instead (where Q
is the specific quantity type). For example, Mass("10 kg")
will return a Try[Mass]
.
On failure the Try.failed
will contain a QuantityStringParseException
which includes the original string to be parsed. This could be used to recover using an alternative parser.
Quantity types implemented as case classes which stored the ratio components of their value (i.e. Velocity(length, time)
) have been refactored to have a single underlying value.
This reduction of all types to a single underlying value has resulted in some loss of precision - reflected in the use of more "approximately equal to" tests. However, this change is a precursor to future work that will support far better precision.
Temperature
and Money
remain as exceptions to the prevailing model.
April 22, 2014
- Add the
approx
method and corresponding=~
and~=
operators - Refactor equals implementation to support proper comparisons with null values
- Add conversions for all Quantity types to console initialCommands.
- Improvements to
Money
- UnitOfMeasure simplification
- Vectors (experimental)
- Additional Units
- Length:
Nanometers
- Volume:
Nanolitres
,Microlitres
,Centilitres
,Decilitres
,Hectolitres
- Energy:
Picojoules
,Nanojoules
,Microjoules
,Millijoules
,Kilojoules
,Megajoules
,Gigajoules
,Terajoules
- Money:
MYR
- Length:
- Arbitrary Numeric type support for Quantity factory methods - All Quantity factory methods will accept arbitrary numeric types for initial values. In the current iteration these values will be converted to a Double within the Quantity object. Nevertheless, this is an important first step to supporting arbitrary numeric types for the underlying value as well.
Thanks to Jeremy Apthorp for his contributions.
Migration Note - The unit Milliliters
has been renamed to Millilitres
, which may require a change to user code. Implicit conversions are available for both spellings.
April 6, 2014
This is the first "pre-release" version. It includes many features
- Over 50 Quantity Types
- Over 180 Units of Measure
- Support for Money, Prices, and Foreign Exchange
- Quantity Ranges
- Natural Language DSL