;doc:csv: clarify intra-day-reversed
This commit is contained in:
parent
588d0dfd26
commit
6a12ff1232
@ -2925,7 +2925,7 @@ For others, use numeric format: +HHMM or -HHMM.
|
|||||||
## `newest-first`
|
## `newest-first`
|
||||||
|
|
||||||
hledger tries to ensure that the generated transactions will be ordered chronologically,
|
hledger tries to ensure that the generated transactions will be ordered chronologically,
|
||||||
including intra-day transactions.
|
including same-day transactions.
|
||||||
Usually it can auto-detect how the CSV records are ordered.
|
Usually it can auto-detect how the CSV records are ordered.
|
||||||
But if it encounters CSV where all records are on the same date,
|
But if it encounters CSV where all records are on the same date,
|
||||||
it assumes that the records are oldest first.
|
it assumes that the records are oldest first.
|
||||||
@ -2945,16 +2945,15 @@ newest-first
|
|||||||
|
|
||||||
## `intra-day-reversed`
|
## `intra-day-reversed`
|
||||||
|
|
||||||
CSV records for each day are sometimes ordered in reverse compared to the overall date order.
|
If CSV records within a single day are ordered opposite to the overall record order,
|
||||||
Eg, here dates are newest first, but the transactions on each date are oldest first:
|
you can add the `intra-day-reversed` rule to improve the order of journal entries.
|
||||||
|
Eg, here the overall record order is newest first, but same-day records are oldest first:
|
||||||
```csv
|
```csv
|
||||||
2022-10-02, txn 3...
|
2022-10-02, txn 3...
|
||||||
2022-10-02, txn 4...
|
2022-10-02, txn 4...
|
||||||
2022-10-01, txn 1...
|
2022-10-01, txn 1...
|
||||||
2022-10-01, txn 2...
|
2022-10-01, txn 2...
|
||||||
```
|
```
|
||||||
In this situation, add the `intra-day-reversed` rule, and hledger will compensate,
|
|
||||||
improving the order of transactions.
|
|
||||||
```rules
|
```rules
|
||||||
# transactions within each day are reversed with respect to the overall date order
|
# transactions within each day are reversed with respect to the overall date order
|
||||||
intra-day-reversed
|
intra-day-reversed
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user