When speaking of the resurrection, you cannot be entirely literal with every single time you come across what Jesus is saying. If you did, you'd have much disharmony within the Bible regarding this. For example (There are more) -
Mark 10:34 - And they shall mock him, and shall scourge him, and shall spit upon him, and shall kill him: and the third day he shall rise again.
Mark 8:31 - And he began to teach them, that the Son of man must suffer many things, and be rejected of the elders, and of the chief priests, and scribes, and be killed, and after three days rise again.
Matthew 12:30 - For as Jonas was three days and three nights in the whale's belly; so shall the Son of man be three days and three nights in the heart of the earth.
So which is it? Is it 3 days and 3 nights? After 3 days? Is it on the 3[sup]rd[/sup] Day? Consider the following text:
2 Chronicles 10:5 - And he said unto them, Come again unto me after three days. And the people departed.
Now watch what it says a couple verses afterwards.
2 Chronicles 10:12 - So Jeroboam and all the people came to Rehoboam on the third day, as the king bade, saying, Come again to me on the third day.
It was understood, that come to me after three days means, “come on the third day”. The Day in which it is spoken of/the day that the event takes place and the 3[sup]rd[/sup] day each count as a day. Now, scripture confirms that Jesus rose on the First Day of the Week, and died the day before the Sabbath. That would make the day he resurrected the 3[sup]rd[/sup] day.
John 19:31 - The Jews therefore, because it was the preparation, that the bodies should not remain upon the cross on the sabbath day, (for that sabbath day was an high day,) besought Pilate that their legs might be broken, and that they might be taken away.
Mark 15:42-43 - And now when the even was come, because it was the preparation, that is, the day before the sabbath, Joseph of Arimathaea, an honourable counsellor, which also waited for the kingdom of God, came, and went in boldly unto Pilate, and craved the body of Jesus.
Luke 23:55-56 - And the women also, which came with him from Galilee, followed after, and beheld the sepulchre, and how his body was laid. And they returned, and prepared spices and ointments; and rested the sabbath day according to the commandment.
Mark 16:1-2 - And when the sabbath was past, Mary Magdalene, and Mary the mother of James, and Salome, had bought sweet spices, that they might come and anoint him. And very early in the morning the first day of the week, they came unto the sepulchre at the rising of the sun.
Mark 16:9 - Now when Jesus was risen early the first day of the week, he appeared first to Mary Magdalene, out of whom he had cast seven devils.
Jesus died on the preparation day, which is the day before the Sabbath. This would happen to be day #6. He was then moved to the grave on that day, before the Sabbath had come, because they did not want bodies on the cross during the Sabbath Day. That day counts as one day. The Next day was the Sabbath Day, and we see the women rested the Sabbath Day according to the commandment. That would be the Seventh Day, as Exodus 20:8-11 shares with us, which would be Friday sunset to Saturday sunset. This isn’t the day Jesus rises. This is the second day that he is buried. Then, we see the woman after the Sabbath had past bought spices that they may anoint the body. And very early the first day of the week, they went to the scepulcre. On this first day of the week, Jesus rises. That is the third day.