For a golf cart license, I know people who have done it immediately after arriving on the island. They were not even asked if they live here or if they had a license elsewhere (which they do not). They just handed in their photos and fee for their 'learners permit' then after a few weeks was able to take their written test for their license.
I believe if you have a US license, you can skip the 'learners permit' stage and take your written test right away.