Skip to content

Releases: wmde/Number

0.9.1

09 Aug 19:31
Compare
Choose a tag to compare

Allow use with ~0.4.0 of DataValues/Common

0.9.0

09 Aug 18:51
Compare
Choose a tag to compare
  • Remove MediaWiki integration
  • Strip all whitespace in DecimalParser
  • Use Wikibase's CodeSniffer instead of MediaWiki's

0.8.3

26 Jun 07:22
Compare
Choose a tag to compare
  • Fixed UnboundedQuantityValue::newFromArray not accepting mixed values.
  • Deprecated DecimalValue::newFromArray and UnboundedQuantityValue::newFromArray.
  • Updated minimal required PHP version from 5.3 to 5.5.9.

0.8.2

17 Nov 13:05
Compare
Choose a tag to compare
  • Fixed QuantityFormatter suppressing ±0 for QuantityValues.
  • Fixed HTML escaping in QuantityHtmlFormatter.

0.8.1

03 Aug 11:23
Compare
Choose a tag to compare
  • UnboundedQuantityValue::newFromArray and QuantityValue::newFromArray both accept serializations without and with an uncertainty interval.

0.8.0

01 Aug 13:39
Compare
Choose a tag to compare
  • Added DecimalValue::getTrimmed.
  • Added UnboundedQuantityValue.
    • QuantityValue extends UnboundedQuantityValue.
    • QuantityParser returns UnboundedQuantityValues instead of always guessing an uncertainty
      interval.
    • QuantityFormatter also accepts UnboundedQuantityValues.
  • QuantityParser defaults to ±0.5 instead of ±1 when asked to guess an uncertainty interval, e.g.
    1~ becomes 1±0.5.
  • QuantityFormatter does not round any more when the value is rendered with a known uncertainty
    interval.
  • Fixed rounding algorithm in DecimalMath (rounded 1.45 to 2 instead of 1).
  • DecimalValue constructor optionally accepts strings with no leading plus sign.
  • Removed QuantityValue::getSignificantFigures.
  • Removed QuantityValue::newFromDecimal (deprecated since 0.1).
  • The $vocabularyUriFormatter parameter in the QuantityFormatter constructor is not nullable any more.

0.7.0

19 Jul 15:27
Compare
Choose a tag to compare

Breaking changes

  • Removed deprecated QuantityUnitFormatter interface.
  • Removed deprecated BasicQuantityUnitFormatter.

Other changes

  • Fixed DecimalValue and QuantityValue allowing values with a newline at the end.
  • DecimalValue strings are trimmed now, allowing any number of leading and trailing whitespace.
  • Added explicit compatibility with DataValues Common 0.2 and 0.3.

0.6.0

09 Sep 15:40
Compare
Choose a tag to compare

Breaking changes

  • QuantityFormatter constructor parameters changed in an incompatible way.
  • BasicNumberUnlocalizer::getUnitRegex returns an empty string. A QuantityParser using this
    does not accept units as part of the input any more.

Additions

  • Added QuantityHtmlFormatter.
  • QuantityFormatter supports an optional format string to concatenate number and unit.

Other changes

  • Deprecated QuantityUnitFormatter interface.
  • Deprecated BasicQuantityUnitFormatter.
  • QuantityParser now always trims the unit it gets via option.
  • The component can now be installed together with DataValues Interfaces 0.2.x.

0.5.0

11 Jun 17:02
Compare
Choose a tag to compare

New major release for breaking changes to the constructor of QuantityFormatter.

0.4.1

09 Oct 19:16
Compare
Choose a tag to compare
Fix @covers tags