Please refer following screenshots:
1st Screenshot: Original Dataset
2nd Screenshot: After Conditioinal Formatting is applied
In 2nd screenshot, using Conditional Formatting:
1) Repeat months are hidden
2) Borders are applied
Dataset range: A1:C17
In Conditional Formatting:
1) Formula applied to hide repeat months: =(A2=A1)
In Conditional Formatting, under Formatting, simply choose Font Colour White. White colour will hide repeat months.
2) Formula applied to apply borders: =($A3<>$A2)
In Conditional Formatting, under Formatting, choose Border Style and Colour.