Once the transactions are parse the time related functions can prune the transactions that are allowed to contribute.
You should ensure any "directive" transactions, like automatic transactions, or consistency transactions occur earlier in the file than they are needed. Think of the input file as source code to a compiler. The dates are more like labels than line numbers. You don't really need to worry about the date order in most cases. I just throw transactions in and once a week or so clean up the files using the "print --sort d" command which also makes the transactions more regular in format. I don't worry about that when I am entering them. I keep directive commands in a separate file that the print command never sees. On Tue, Oct 9, 2012 at 3:06 PM, Jeroen De Vlieger <[email protected]> wrote: > > > On Tue, Oct 9, 2012 at 8:25 PM, John Wiegley <[email protected]>wrote: > >> >>>>> Jeroen De Vlieger <[email protected]> writes: >> >> > ; I would expect ledger to parse the journal and process the >> transactions in >> > order of date. >> >> There are many times when I would have liked this as well, but it is MUCH >> more >> complicated than it sounds. :) >> > So It is not a bug then? > Transactions are parsed *and* processed in the order that they appear in > the journal file? > > Does this also mean that the ledger program assumes that the journal is > correctly ordered? > I.e. when using the -e <date> flag, will ledger stop parsing once it > encounters a transaction with a later date assuming that all the following > transactions are will also be at a later date? > > In general when using time related flags like -M, -b, -e, ... Does ledger > make any assumption about the order of the transactions? > I.e. should I worry and be extra careful to make sure my transactions are > in order or is that a waste of time? > > with kind regards, > Jeroen > -- Craig, Corona De Tucson, AZ enderw88.wordpress.com
