-
-
Notifications
You must be signed in to change notification settings - Fork 397
Can we avoid trailing decimal marks ? #2664
Copy link
Copy link
Open
Labels
A-WISHSome kind of improvement request or proposal.Some kind of improvement request or proposal.addcloseimportjournalThe journal file format, and its features.The journal file format, and its features.needs-designTo unblock: needs more thought/planning, leading to a spec/planTo unblock: needs more thought/planning, leading to a spec/planneeds-discussionTo unblock: needs more discussion/review/explorationTo unblock: needs more discussion/review/explorationneeds-docsTo unblock: needs corresponding documentation or doc updatesTo unblock: needs corresponding documentation or doc updatesneeds-impact-analysisTo unblock: needs analysis of interactions with other features, users, ecosystemTo unblock: needs analysis of interactions with other features, users, ecosystemprintprint-unique
Description
Metadata
Metadata
Assignees
Labels
A-WISHSome kind of improvement request or proposal.Some kind of improvement request or proposal.addcloseimportjournalThe journal file format, and its features.The journal file format, and its features.needs-designTo unblock: needs more thought/planning, leading to a spec/planTo unblock: needs more thought/planning, leading to a spec/planneeds-discussionTo unblock: needs more discussion/review/explorationTo unblock: needs more discussion/review/explorationneeds-docsTo unblock: needs corresponding documentation or doc updatesTo unblock: needs corresponding documentation or doc updatesneeds-impact-analysisTo unblock: needs analysis of interactions with other features, users, ecosystemTo unblock: needs analysis of interactions with other features, users, ecosystemprintprint-unique
hledger's
print-like commands will show (and in the case ofaddandimport, write to the journal) a trailing decimal mark (with no decimal digits after it), when needed to disambiguate an amount containing a single digit group separator.https://hledger.org/1.52/hledger.html#trailing-decimal-marks
This can sometimes be bothersome. Eg, for people working with commodities which never (or practically never) have decimal digits, like Japanese users working with JPY amounts.
https://x.com/diprex83/status/2061188851935383629
I'm not sure how bothersome the current behaviour is in practice, especially given that most people work with more than one currency/commodity sooner or later. But there are other ways we could handle this, and there might be one that's more convenient and intuitive.
This touches on: journal format, parsing of journal files, reparsing of hledger output, entries written by add and import, digit group mark and decimal conventions in different countries and with different currencies, etc. So it's hard to foresee all impacts on the various data and usage configurations. But I am noting the issue and creating a placeholder for any new discussion/designs.