hledger/hledger-lib/Hledger/Data
Simon Michael 0b380971f7 journal: require a decimal point in commodity/format/D directives
A commodity directive that doesn't specify the decimal point character
increases ambiguity and the chance of misparsing numbers, especially
as it overrides all style information inferred from the journal amounts.
In some cases it caused amounts with a decimal point to be parsed as if
with a digit group separator so 1.234 became 1234.

We could augment it with extra info from the journal amounts, when available,
but it would still be possible to be ambiguous, and that won't be obvious.

A commodity directive is what we recommend to nail down the style.
It seems the simple and really only way to do this reliably is to require
an explicit decimal point character. Most folks probably do this already.

Unfortunately, it makes another potential incompatiblity with ledger and
beancount journals. But the error message will be clear and easy to
work around.
2018-04-20 21:56:06 -07:00
..
Account.hs lib: Account, AccountName: hlint 2018-02-15 11:38:34 -08:00
AccountName.hs silence redundant import warnings with ghc 8.4 2018-03-24 22:51:56 +00:00
Amount.hs journal: infer and balance amounts with standard amount styles (fix #737) 2018-04-20 13:40:05 -07:00
AutoTransaction.hs lib, app: better descriptions for forecast transactions 2018-04-18 16:05:08 -07:00
Commodity.hs silence redundant import warnings with ghc 8.4 2018-03-24 22:51:56 +00:00
Dates.hs cli: clarify smart dates with more examples; add support for YYYYMM 2018-04-04 17:45:23 +01:00
Journal.hs journal: require a decimal point in commodity/format/D directives 2018-04-20 21:56:06 -07:00
Ledger.hs bal/bs/cf/is: sort accounts by account code, if any, then account name 2018-01-23 11:33:24 -08:00
MarketPrice.hs Added a simple 'showMarketPrice' function to show market price directives in a journal-compatible way (#505) 2017-02-03 18:20:00 -08:00
Period.hs bs/bse/cf/is: fix display of abbreviated name for December 2018-01-19 12:45:51 -08:00
Posting.hs silence redundant import warnings with ghc 8.4 2018-03-24 22:51:56 +00:00
RawOptions.hs lib: optserror -> usageError, consolidate with other error functions (#529) 2017-03-29 08:00:51 -07:00
StringFormat.hs cli: refactor: move commands to a subdirectory, reinstate test command 2017-09-12 10:04:36 -07:00
Timeclock.hs lib: textification: descriptions & codes 2016-05-24 19:00:58 -07:00
Transaction.hs journal: infer and balance amounts with standard amount styles (fix #737) 2018-04-20 13:40:05 -07:00
Types.hs journal: infer and balance amounts with standard amount styles (fix #737) 2018-04-20 13:40:05 -07:00