npm moment-duration-format 2.2.0
Version 2.2.0

latest releases: 2.3.2, 2.3.1, 2.3.0...
6 years ago

Fallback Number Formatting

This version adds a fallback number format function to fully support devices and environments that do not implement a complete version of Number#toLocaleFormat.

Localization options for the fallback number format function are available: decicmalSeparator, groupingSeparator, and grouping.

The plugin executes a feature test for toLocaleString on initialization to determine which number format function it will use. You may force the plugin to use the fallback number format function in all environments by setting useToLocaleString to false.

Issues Fixed

  • toLocaleString is not fully implemented in many environments (#90)

  • Format errors due to floating point rounding issues in JavaScript (#93)

  • Format errors due to floating point rounding issues within Moment.js (#94)

Known Issues in Version 2.2.0

  • #93 and #94 affect Microsoft environments (Edge, IE11, Windows Phone) when using toLocaleString (#95)

  • HTC Devices can format zero-value tokens as "0.0" instead of "0" when using significant digits. (#96)

Don't miss a new moment-duration-format release

NewReleases is sending notifications on new releases.