Admiral Nimitz had one advantage: code experts had broken the Japanese Navy's JN-25b code. Since the early spring of 1942, the US had been decoding messages stating that there would soon be an operation at objective "AF". They guessed that it was Midway and sent an uncoded radio message that Midway needed fresh water. The code breakers then picked up a Japanese message that "AF was short on water." was also able to determine the date of the attack as either 4 or 5 June, and to tell Nimitz exactly which Japanese ships were coming. Japan had a new codebook, but it was not used for several days. The new code, which had not yet been figured out, was used shortly before the attack began, but the important information had already been figured out.