No, the Japanese were warned but they weren't given a date as to when the US would drop the bomb.
Not only that but what evidence did the US give to proved they had such a weapon? Sure they wrote that they promised they were gonna drop an atomic bomb, but anyone can easily just write it down as a bluff. Plus the Japanese were already planning to surrender in the first place. The only reason why it took so long was because they wanted the emperor to stay in power, as well as have the imperial family protected. The emperor was just a figurehead, he had no real power, so he didn't really pose a threat. The US could have just accepted the Japanese's term of surrender, which was keeping the emperor in power. That was their only condition, which didn't really pose a threat, yet the US was dead set on their unconditional surrender.