Time to close out 2023 (in May)

...now that we are in the 5th month of the year, I decided that it was time to split my current file into two, one for 2023 and one for 2024.
Closing a year in hledger is one of those tasks that happen with such infrequency, that I have to remind myself of the details...

Time to close out 2023 (in May) – A User's view of Hledger

1 Like

Great post! I really value such writing about hledger experiences. Especially about close, always one of the tricker commands. I made a few notes.

I first thought NEWYEAR meant the name of the file for the new year.

It did, also. (Not sure about the file extension). For me files are named YEAR.journal. I too scratch my head rereading this doc, thanks for the feedback.

running a short hledger command is my standard trick for testing if there are any errors

hledger check is good for this (no output means all is good).

Lesson learned was that in my opening balances not to have any commented out lines or blank lines.

Yes a blank line or a line with comment character in column 0 effectively ends the transaction, causing parse errors. The trick is that the commented line must be indented, then it'll be ok.

1 Like

Thank you, and you have advanced my hledger knowledge! Good to know about "hledger check" and indenting commented out opening balance lines.

1 Like