Releases: wmde/Number
Releases · wmde/Number
0.9.1
0.9.0
- Remove MediaWiki integration
- Strip all whitespace in DecimalParser
- Use Wikibase's CodeSniffer instead of MediaWiki's
0.8.3
0.8.2
- Fixed
QuantityFormatter
suppressing ±0 forQuantityValue
s. - Fixed HTML escaping in
QuantityHtmlFormatter
.
0.8.1
UnboundedQuantityValue::newFromArray
andQuantityValue::newFromArray
both accept serializations without and with an uncertainty interval.
0.8.0
- Added
DecimalValue::getTrimmed
. - Added
UnboundedQuantityValue
.QuantityValue
extendsUnboundedQuantityValue
.QuantityParser
returnsUnboundedQuantityValue
s instead of always guessing an uncertainty
interval.QuantityFormatter
also acceptsUnboundedQuantityValue
s.
QuantityParser
defaults to ±0.5 instead of ±1 when asked to guess an uncertainty interval, e.g.
1~
becomes1±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 theQuantityFormatter
constructor is not nullable any more.
0.7.0
Breaking changes
- Removed deprecated
QuantityUnitFormatter
interface. - Removed deprecated
BasicQuantityUnitFormatter
.
Other changes
- Fixed
DecimalValue
andQuantityValue
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
Breaking changes
QuantityFormatter
constructor parameters changed in an incompatible way.BasicNumberUnlocalizer::getUnitRegex
returns an empty string. AQuantityParser
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
New major release for breaking changes to the constructor of QuantityFormatter.
0.4.1
Fix @covers tags