The Prologue of Ochrid text for the Holy and Righteous Joseph on December 31st says that Saint Joseph: "took the most holy Virgin from the Temple into his home at the age of eighty, and entered into rest at the age of a hundred and ten." (Vol. 4, p. 393) If these ages are accurate, then Jesus was somewhere around 30 years old when Joseph died.
For some reason (I guess this is just what I read in Protestant sources), I had always believed that Joseph had died while Jesus was still a child or teenager. So what I'm curious about is, what early written sources discuss the age of Joseph (and/or Jesus) when Joseph died? I'm not saying I wouldn't believe it if it wasn't in a written document, of course; I just want to learn more about this particular tradition.