The GH file is available for download in the post you linked to: halflifesin.gh, 10 KB
Also, I’ve used that same reference and code in many forum posts: