All Versions
Latest Version
Avg Release Cycle
220 days
Latest Release
239 days ago

Changelog History

  • v1.6.0

    December 11, 2019
    • Enable scala 2.13 (fixing #344) #368
    • πŸ›  Fix typos #369
    • ⚑️ Update scalatest to 3.1.0 #371
    • ⚑️ Update scalacheck to 1.14.2 #370
  • v1.5.0

    September 10, 2019
    • βž• Add missing operations with Price, Quantity and numbers. #343
    • πŸ‘ Improving support for radiological units and types #337
    • EnergyDensity: symbol changed from j/mΒ³ to J/mΒ³ #332
    • πŸ‘ Allow currency parsing from implicit context #330
    • πŸ”„ Changed the Kelvin symbol from "Β°K" to "K" #328
    • All dimensions were made to have implicit field equal to this #326
    • ⚑️ Updates to support scala, scala.js and scala native latest versions
  • v1.4.0

    November 07, 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/s2 (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/s2 (acceleration), ng (mass) (PR 290)
    • ⚑️ Updates to support scala, scala.js and scala native versions
  • v1.3.0

    May 25, 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 Quantity.rounded method (PR 217)
    • Stabilized toString output for MoneyContext and MoneyNumeric (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
  • v1.2.0

    February 17, 2017
    • πŸ‘‰ 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)
    • πŸ“š Miscellaneous documentation and compiler warning fixes.
  • v1.1.0

    January 10, 2017

    πŸ”„ Changes merged:

    • βž• Add Rankine to thermal package (PR 161)
    • βž• Add ceil, floor, and rint 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)
  • v1.0.0

    December 20, 2016

    Dec 20, 2016

    • βž• Add money / price in place of price * money
    • ⚑️ Update to Scala 2.12.1
    • ⚑️ Update to Scala.js 0.6.13
    • πŸ‘‰ Use zero decimal places for JPY and KRW

    Thanks to Derek Morr, Gary Keorkunian and Szabolcs Berecz for their contributions.

    πŸš€ On release 1.0.0 squants has moved to the org.typelevel organization and got new commiters and administrators to keep the project moving forward.

    Migration Notes

    • ⚑️ Update the dependency organization from com.squants to org.typelevel as

      "org.typelevel" %% "squants" % "1.0.0"

  • v0.6.2

    May 11, 2016

    May 10, 2016

    • βž• Addition of Information and DataRate dimensions
    • Integration with Scala.js
    • πŸ‘Œ Improvements to Vectors including
      • add map methods
      • add angle and polar methods for extracting the polar coordinates
      • rename to SVector with a factory methods for Double and Quantity based Vectors
      • better typing and dimensional conversions
    • βž• Addition of useful for mapping over underlying value without changing the type or units
    • βž• Addition of Time unit Nanoseconds
    • πŸ‘Œ Improve conversions to and from Time and scala.concurrent.Duration to preserve units
    • βž• Addition of Velocity unit KilometersPerSecond
    • πŸ›  Fixed an issue with the KilometersPerHour unit
    • βž• Added ability to initialize Quantities from strings in exponential format
    • βž• Addition of Area.squareRoot and Volume.cubeRoot, each returning a Length
    • βž• Addition of Length unit Angstroms
    • βž• Addition of Energy unit Ergs
    • βž• Addition of Power unit ErgsPerSecond
    • ⚑️ 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 units GramsPerSquareCentimeter and KilogramsPerHectare
    • βœ‚ Removed bogus conversion Irradiance / Power -> Area
    • βž• Addition of SpectralIrradiance dimension
    • βž• Addition of Irradiance unit ErgsPerSecondPerSquareCentimeter
    • βž• 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.

    Migration Notes

    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.

  • v0.5.3

    June 11, 2015

    June 11, 2015

    • ✨ Enhance Quantity model to preserve the unit used in creating the value
    • πŸ‘€ Rename UnitMultiplier trait to UnitConverter, the multiplier field to conversionFactor, and set access level of all fields to protected (see Migration notes)
    • πŸ“‡ Rename QuantityCompanion to Dimension
    • πŸ“‡ Rename Quantity.valueUnit to unit
    • πŸ“‡ Rename MassFlowRate to MassFlow
    • πŸ“‡ Rename VolumeFlowRate to VolumeFlow
    • βž• Add dimension value to Quantity
    • πŸ‘Œ Improvements to TimeIntegral and TimeDerivative traits
    • βž• Addition of TimeSquared, an intermediate non-quantity value, and SecondTimeDerivative, 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 takes Mass and Velocity and applies the conversion (Mass, Velocity) => 1/2(Mass * Velocity * Velocity) yielding an Energy value.
    • βž• Addition of KineticEnergy method which takes Mass and Momentum and applies the conversion (Mass, Momentum) => Momentum / (2 * Mass), yielding an Energy value.
    • βž• Addition of Mass units Kilopounds and Megapounds
    • βž• Addition of PowerRamp units WattsPerMinute and KilowattsPerMinutes
    • βž• Addition of MassFlow units PoundsPerSecond, PoundsPerHour, KilopoundsPerHour and MegapoundsPerHour
    • βž• Addition of VolumeFlow unit CubicFeetPerHour
    • βž• Addition of Dimensionless unit Percent
    • 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 to CubicUsMiles
    • 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 a Tuple2 and initializing a Quantity from a Tuple.
    • βž• Addition of PressureChange dimension
    • Correction of Bars / Pascals conversion factor

    Thanks to Steve Barham for his contributions.

    Migration Notes

    ⚑️ 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.

  • v0.4.2

    July 06, 2014
    πŸ‘Œ Improvements to Market
    • βž• Add 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 (==#, !=#, <#, <=#, >#, >=#)
    Other General Improvements
    • βž• 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 except Money which currently requires special handling
    • πŸ‘€ Implement String => Quantity parsing conversions returning Try[Quantity] for all existing types (see Migration Notes below)
    • βž• Additional Units:
      • ElectricCharge: MilliampereHours, MilliampereSeconds
    • βž• Add unapply to UnitOfMeasure 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
    πŸ› Bug fixes
    • πŸ›  Fixed SquareInches.symbol

    Migration Note

    πŸ“œ Quantity String Parsing

    πŸ“œ 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 Value Model Unification

    ♻️ 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.