Try below formula in B2 and copy down:
Formula: copy to clipboard
=IF((A3>=DATE(YEAR(A3),1,1))*(A3<=DATE(YEAR(A3),7,1)),TEXT(DATE(YEAR(A3),7,1),"mmm-yy"),TEXT(DATE(YEAR(A3),1,1),"mmm-yy"))