Protoevangelium of James is accurate this is even more remarkable. In the Protoevangelium Joseph is depicted as elderly man who was widower with children of his own who reluctantly agreed to marry Mary after being chosen by lot. After being out of town working for a few months he comes home and finds that his betrothed is pregnant and assumes what any man would. But Joseph believes the revelation of God rather than his reason.
Almighty God, from the house of Thy servant David Thou didst raise up Joseph to be the guardian of Thy Son and the husband of His mother, Mary: grant us grace to follow the example of this faithful workman in heeding Thy counsel and obeying Thy commands; through the same Jesus Christ our Lord, who liveth and reigneth with Thee and the Holy Ghost, ever one God, world without end. Amen.