There are sites that serve as a library of uploaded custom functions. Have you searched them?
The formulas to convert is long and drawn out. I create an app to convert 13 to 10 and 10 to 13. It's not a function, but it get the job done. I've now tested around 20 books with this app and all have converted correctly.