Additionally,
Mark 8:31 says, "And He began to teach them that the Son of Man must suffer many things and be rejected by the elders and the chief priests and the scribes, and be killed, and after three days rise again." Yet,
1 Cor. 15:4 says, "and that He was buried, and that He was raised on the third day according to the Scriptures." Also,
Luke 24:5-7, "and as the women were terrified and bowed their faces to the ground, the men said to them, 'Why do you seek the living One among the dead? He is not here, but He has risen. Remember how He spoke to you while He was still in Galilee, saying that the Son of Man must be delivered into the hands of sinful men, and be crucified, and the third day rise again.'" Here we can see that "after three days" is equivalent to mean "on the third day."
Therefore, we can see that because of the Jewish usage of counting any part of a day as the whole of the day, the term "three days and nights" is idiomatic and not literal.
How long was Jesus dead in the tomb? | CARM.org