docs: rewrite actual/effective dates doc, harmonising with ledger

This commit is contained in:
Simon Michael 2010-07-11 05:56:25 +00:00
parent 4f49094088
commit 504d760640

View File

@ -551,34 +551,33 @@ subsequent dates may be written as month/day. Eg:
1/31 ... 1/31 ...
##### Actual and effective dates ##### Actual/effective dates
Frequently, a real-life transaction has two (or more) dates of Real-life transactions sometimes have two (or more) dates of interest.
interest. For example, you might make a purchase on friday with a debit For example, you might buy a movie ticket on friday with a debit or credit
card, and it might clear (take effect in your bank account) on card, and the transaction might appear in your bank account on monday.
tuesday. It's sometimes useful to model this accurately, so that your When you don't care about this, just record one date. When you do care,
hledger balances match reality. So, you can specify two dates for a you can record two dates separated by `=`: the *actual date* on the left
transaction, the *actual* and *effective* date, separated by `=`. Eg: and the *effective date* on the right. Here's how hledger and ledger users
use these terms:
2010/2/19=2010/2/23 ... ; The ticket purchase took EFFECT on friday 19th,
; but ACTUALly appeared in bank statement on monday 23rd.
; The effective date is often the earlier one, but it goes on the right.
;
; ACTUAL=EFFECTIVE
2010/2/23=2010/2/19 movie ticket
expenses:cinema $10
assets:bank:checking $-10
Then you can use the `--effective` flag to prefer the effective (second) You can use the `--effective` flag to prefer the effective date in
date, if any, in reports. This is useful for, eg, seeing a more accurate reports. This can be useful, eg, to adjust your transaction dates to
daily balance while reconciling a bank account. match the ones in your bank statement for easier reconciling.
So, what do *actual* and *effective* mean, exactly ? I always assumed that The year may optionally be omitted in the second date.
the actual date comes first, and is "the date you enacted the
transaction", while the effective date comes second, and is optional, and
is "the date the transaction took effect" (showed up in your bank
balance).
Unfortunately, this is the reverse of c++ ledger's interpretation (cf hledger does not allow separate dates for individual postings, unlike c++
[differences](#other-differences)). However it's not *too* serious; just ledger.
remember that hledger requires the first date; allows an optional second
date which the `--effective` flag will select; and the meaning of "actual"
and "effective" is up to you.
The second date may omit the year if it is the same as the first's.
##### Smart dates ##### Smart dates