I'm entering payslips into my hledger journal, and I'd like to record the pay period that each one covers. My first thought was to use a tag like:
pay-period:2025-01-01..2025-01-15
Each payslip explicitly lists its pay period start and end dates, but I'm concerned this notation is misleading, since hledger uses start..end to denote a date span that excludes the end date, whereas a pay period includes both dates.
How do others represent pay periods in their journals? Is there a concise, unambiguous convention?
That tag value is just informational for you, so the exact syntax probably doesn't matter too much.
You could use range notation from mathematics: [2025-01-01..2025-01-15]
This will work but might look too much like hledger's bracketed-virtual posting syntax - but you probably don't use those, so no problem there.
I record the billing period, or rather the invoice id (YYYYMMab), as a subaccount rather than a tag: assets:receivable:CLIENT:INVOICE, so I can report unpaid balances.
Cool, thanks for the suggestions (and for hledger!).
The subaccount approach is something I hadn't even considered. It's not quite what I'm after in this case, but definitely something I'll keep in mind for future uses.
I like the bracketed range notation. I was briefly tempted by [2025-01-01,2025-01-15], but then remembered that tag values can't contain commas.
I think I'm actually leaning towards 2025-01-01/2025-01-15. After a bit more thought, I realized that my main goal is just to record the endpoint dates shown on the document, without expressing any particular inclusion semantics.