Automatic borders / lines between months in a spreadsheet?

I have a spreadsheet showing a list of bookings from my bank account.
Each booking has a date, obviously.
I’d like to visually group the bookings by month, to get some visual structure. This could be done with background colors or with separator lines / cell borders.

Is there any way to do this automatically / dynamically in LibreOffice Calc?

This can be done with conditional formatting.

Select first complete row of data. Choose conditional formatting. For condition choose “Formula Is”, then enter the formula “MONTH($A2)<>MONTH($A3)”, (assuming date is in first column.). Select new style and then in the cell style window choose “Borders” and set up bottom border style. Then copy the top row of the table and use paste special, formats only to the remainder of the table.