1 Samuel 30.12: "He ate and was revived, for he had not eaten any food or drunk any water for three days and three nights. 13 David asked him, "To whom do you belong, and where do you come from?" He said, "I am an Egyptian, the slave of an Amalekite. My master abandoned me when I became ill three days ago. " In this case "for three days and three nights' somehow was fulfilled when his master left him 'three days ago'.
Gen 42.16: "And he put them all in custody for three days. 18 On the third day, Joseph said to them, "Do this and you will live, for I fear God" and they are released ON that day (from the context of verses 25-26). In this case the 'for three days' meant only 'into the third day'
1 Kings 20.29: "For seven days they camped opposite each other, and on the seventh day the battle was joined. " In this case we have 'for seven days' meant only 'into the seventh day'.
2 Chr 10.5: "And he said to them, 'Return to me again in three days" (NAS) with verse 12: "So Jeroboam and all the people came to Rehoboam on the third day as the king had directed, saying, 'Return to me on the third day." In this case 'in three days' is equivalent to 'on the third day'.
Esther 4.16: "Go, gather together all the Jews who are in Susa, and fast for me. Do not eat or drink for three days, night or day. I and my maids will fast as you do. When this is done, I will go to the king, even though it is against the law. And if I perish, I perish.'" And then in 5.1: "On the third day Esther put on her royal robes and stood in the inner court of the palace, in front of the king's hall. " In this case, "on the third day" is equivalent to "for three days, night or day".
That gives a little of a baseline that "3 days and nights" and be "on the 3rd day." It is an idiom, which all languages are full of. When I was a kid we used the term "booking" to mean "run fast." Somebody who dies doesn't literally, "kick the bucket." We even see this in the NT:
Matt 27.63: ""Sir," they said, "we remember that while he was still alive that deceiver said, `After three days I will rise again.' 64 So give the order for the tomb to be made secure until the third day. "
Note that 'after three days' was somehow equivalent to 'until the third day' (not 'until the fourth day').