link to the problem
bernard didnt know initially. which means he didnt have 18 or 19 as date.
albert knew this bcoz the month he has is neither may nor june.
when albert confirmed this, bernad knew the month can only be july or aug.
when bernad said that he knew now , the options are 15 aug ,17th aug or 16 july.
when albert says he knows now, the month he has has to be july.
had it been aug , he wouldnt know if it is 15 or 17.
so it is july 16
he knew when albert confirmed that bernad cant know