Remove currency property on number in JTS
See original GitHub issueI am considering removing the currency
property on the number
type as I am unclear on its exact use e.g.:
- how should this be parsed or is parsing “undefined” other than that this is a currency (does that just mean strip all non-numeric characters
- are you supposed to be able to determine the currency
I believe it was introduced by @pwalsh here: https://github.com/dataprotocols/dataprotocols/commit/d8f80414964f8ecef186679f500d17554c4135f5#diff-8bee37e143f0d0ee3d1c0bc8eab91a5eR252
One option is that this is just saying: hey this is a currency and its up to you to parse but we should then make the explicit.
Issue Analytics
- State:
- Created 7 years ago
- Comments:27 (27 by maintainers)
Top Results From Across the Web
Remove currency symbol from string and convert to a number ...
I found this very helpful var currency = "-$4,400.50"; var number = Number(currency.replace(/[^0-9\.-]+/g,""));. Convert (Currency) String ...
Read more >Removing currency symbols - GrowthPenguin
Use my method for removing currency symbols to increase conversions. ... The property returns and sets the HTML markup as a string.
Read more >in the united states bankruptcy court - GovInfo
Upon timely motion of a party in a proceeding based upon a State law claim or. State law cause of action, related to...
Read more >JORDAN TAX SERVICE, INC.
DO NOT USE QUOTATION MARKS ANYWHERE WITHIN THE FILE. • All numeric/currency fields may contain numbers and decimal points only. No commas, parentheses...
Read more >Hibernate ORM 5.3.28.Final User Guide - Red Hat on GitHub
Querying for revisions of entity including property names that were modified; 21.14. ... Since Hibernate has no knowledge how to persist the Money...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Having read through several of the issues on the topic of numbers… may I make a suggestion?
Numbers should be numeric. Currencies and percentages are a type of unit, and these should be defined in the metadata, not the data. If it’s really necessary to allow publishers to create bloated numeric data that won’t parse properly using standard tools… then
bareNumber
seems like a reasonable option.Side note: I would also advocate for the removal of
groupChar
(default: none) and either the removal ofdecimalChar
(default: “.”) or allow only “.” or “,” as possible values. See https://en.wikipedia.org/wiki/Decimal_mark#Current_standards.@ezwelty consider a publisher who is expert but is packaging an upstream data file they don’t control. That is actually a common case. Often there is a strong aversion to changing that data file (e.g. it may come from another government department and it is important it is not altered as it is official). In this case the publisher is expert but they can’t change the data.
That is a good example. You could address if written as
$-1.00
which is imperfect but which we might have to support for now.BTW I’m really impressed with your corner case identification – please keep your feedback coming it is really valuable 🍕 👍 💯 🥇
@roll i think we want to get stuff around
bareNumber
into the implementor guide.