hledger icon indicating copy to clipboard operation
hledger copied to clipboard

possibility to set default month

Open LukasGasior1 opened this issue 9 years ago • 3 comments

I like to keep my journal files split by month (eg. 2016-06.journal) and include them in main file. It would be nice to be able to specify default month (similar way as default year) at the beginning of a file and only specify a day for transaction. If that makes sense I can volunteer (or at least try) to implement such feature as I'm currently learning Haskell.

LukasGasior1 avatar Jun 28 '16 19:06 LukasGasior1

I guess it makes sense. It would be Ledger-incompatible. You might or might not want to be able to combine it with a year. Would be a nice experiment, if you make it I will try it out.

simonmichael avatar Jun 28 '16 20:06 simonmichael

I gave it some thought. First approach is to use separate directive, like M06, and another one is to combine it with a kind of "date prefix" directive, like D2016/06 (which IMO looks better). Are there any plans to add support for different date formats in the future?

LukasGasior1 avatar Jul 01 '16 13:07 LukasGasior1

Not at present.

The simplest thing might be to extend the existing Y directive to allow an optional month as well as year.

Y2016/7

simonmichael avatar Jul 01 '16 13:07 simonmichael