According to a common Hebrew idiom, any part of a day could be counted as the whole day and night, this is how the the Jews measured time.
i.e
The rain of the flood was upon the earth “forty days and forty nights,” or, simply “forty days” (Gen. 7:12, 17).
In 1 Samuel 30:12-13, the expressions “three days and three nights” and “three days” are equivalent to one another.
When Israel asked Rehoboam to lighten its burdens, he said: “Depart ye for three days, then come again to me.” The context subsequently says that they returned on “the third day” (1 Kgs. 12:5, 12).
When Esther was about to risk entrance into the king’s presence, she requested her fellow Jews to neither “eat nor drink three days, night or day,” but on “the third day,” she went into unto the king (Esth. 4:16; 5:1).
Finally, note this. The Pharisees said to Pilate, “This deceiver said while he was yet alive, After three days I will rise again. Command therefore, that the sepulcher be made sure until the third day (Mt. 27:63-64).
Clearly there was flexibility in the Hebrew mode of expressing time.