Skip to content

fix: handle unformat symbols containing decimal separators - #248

Open
DeoJin wants to merge 1 commit into
openexchangerates:masterfrom
DeoJin:fix-unformat-symbol-decimal-separator
Open

fix: handle unformat symbols containing decimal separators#248
DeoJin wants to merge 1 commit into
openexchangerates:masterfrom
DeoJin:fix-unformat-symbol-decimal-separator

Conversation

@DeoJin

@DeoJin DeoJin commented Mar 16, 2026

Copy link
Copy Markdown

Summary

Validation

  • node -e "const accounting=require('./accounting'); function assert(cond,msg){ if(!cond){ console.error(msg); process.exit(1);} } assert(accounting.unformat('kr. 123.45', '.', 'kr.')===123.45,'regression failed'); const vals=accounting.unformat(['kr. 123.45','kr. 67.89'],'.','kr.'); assert(vals[0]===123.45 && vals[1]===67.89,'array regression failed'); assert(accounting.unformat('$ 123,456.78')===123456.78,'baseline failed'); console.log('ok');"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant