I've had this discussion with a few oncologists.
For my own treatment, I was told 18-36 months HT at the outset, as a high risk patient. I read several research papers which variously show the significance of getting PSA low before starting HT, either for better outcomes, of for less need for adjuvant HT (i.e. HT after the RT). My PSA had dropped from 47 to 5 after 6 weeks on HT and onco was going to book RT at 12 weeks on HT. I decided I wanted to get my PSA down to 0.1 before RT, and calculated that would be at 21 weeks at this rate of drop, and onco was very happy to delay but not past 6 months - he'd had a couple of high risk patients do that but their PSA started rising before ever reaching their target. The paper which suggested getting down to 0.1 before RT claimed there was no point in continuing HT after RT in this case. Neither I nor my onco bought this, but nevertheless I figured this sounded like an advantage even so, hence that was my target, but I would continue with the HT afterwards anyway. I was taking the view that I'd grab what benefits I could get, even if it just gave me a 1% improvement in chances of a cure - the hormone therapy wasn't impacting anywhere near as much as I had feared it might. When I got to 18 months on HT, I asked my onco again, 18 or 36 months? Because my PSA had been undetectable since the RT, he said I could stop anytime I wanted to. Still the HT wasn't impacting me in any way I couldn't put up with for some months longer for the sake of another 1% chance of a cure, so I continued until 22 months.
If your treatment includes adjuvant HT, the period talked about is the total time on HT. It doesn't matter much when you have the RT during that period, although you do want it before you become castrate resistant, so you don't want to delay the RT past the point where PSA is dropping at a significant rate. In the UK, it's a bit unusual to have PSA measured during the neoadjuvant HT (before RT), but I asked and there was no resistance to doing so.
Longer periods on HT tend to be used for those with higher gleason scores or more known spread, and those whose PSA doesn't get very low or drop very quickly on the HT. It is thought that if you have micro-mets (too small to show on scans) outside the RT treatment area, 18 or more months on HT with the primary tumour no longer active may be sufficient to kill them, and prevent recurrence which they would otherwise have caused after HT.