I get the part where they eliminate duplicate days, but that still leaves two dates to choose.
Invert your thinking. The day has to be a duplicate, otherwise the person given the day would know immediately.
There is only one for the 18th. It’s the only date that if you know the day then you also know the month. So as soon as Bernard finds out the date is the 18th he knows which one it is. And it’s the only one that could let him know that.