Previously what I've read is that it's 3 continuous years of residency prior to international debut, with holidays being excluded, but not working/living overseas, with some sort of exemption for 5+ years when being U18.
Edit: No exemptions:
Subject to Regulation 8.2, a Player may only play for the senior fifteen-aside National Representative Team, the next senior fifteen-a-side National Representative Team and the senior National Representative Sevens Team of the Union of the country in which:
(a) he was born; or
(b) one parent or grandparent was born; or
(c) he has completed thirty six consecutive months of Residence immediately preceding the time of playing.