Try this in E2 as array formula, and drag down

=IFERROR(MODE(IF($B$2:$B$36=D2,DAY($A$2:$A$36),"") )&MID("thstndrdth",MIN(9,2*RIGHT(MODE(IF($B$2:$B$3 6=D2,DAY($A$2:$A$36),"")))*(MOD(MODE(IF($B$2:$B$36 =D2,DAY($A$2:$A$36),""))-11,100)>2)+1),2),"All are unique")