onepub-dev/money.dart

Single digit fraction parsing

Closed this issue · 2 comments

ened commented

Currently, adding these two lines to money_parse_test.dart would fail:

      expect(euro.parse('€EUR10,2', pattern: 'SCCC0,0'),
          equals(Money.fromInt(1020, euro)));

This results money2 parsing 10.02 EUR, instead of 10.20 EUR.
Should/Could this plugin perform differently here or would this be considered a client task to transform the input beforehand?

I would view this as a bug.

Fixed in 2.0