During a funeral the pastor who was officiating the service repeatedly stated this," your spirit is on earth for 30 days after you die". This really puzzled me and I wrote it down during the service. I approached him after the service and asked him about what was said. He said the same thing, "your spirit stays on the earth for 30 days". I didn't think to ask him where in the bible does it say that.
I have never heard this idea before, and I certainly have not read it in the Bible. The only place I can find where one might get such an idea is the fact that Jesus was on earth about thirty days after his resurrection. But that was a special case because people had to be able to witness that they had seen Jesus after the resurrection. (1 Corinthians 15:1-9) Also, Jesus was resurrected in his physical body. So his resurrection would not apply to anyone else. Nowhere else does the Bible say anything about spirits remaining for thirty days.
The Israelites mourned for Aaron (Numbers 20:29) and Moses (Deuteronomy 34:8) for thirty days. That, however does not say their spirits hung around for those days.