Skip to content

Can we avoid trailing decimal marks ? #2664

Description

@simonmichael

hledger's print-like commands will show (and in the case of add and import, 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-WISHSome kind of improvement request or proposal.addcloseimportjournalThe journal file format, and its features.needs-designTo unblock: needs more thought/planning, leading to a spec/planneeds-discussionTo unblock: needs more discussion/review/explorationneeds-docsTo unblock: needs corresponding documentation or doc updatesneeds-impact-analysisTo unblock: needs analysis of interactions with other features, users, ecosystemprintprint-unique

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions