وَلَا يَزَالُ عَلَى حُكْمِ الْمُسَافِرِ حَتَّى يَنْوِيَ الْإِقَامَةَ فِي بَلْدَةٍ خَمْسَةَ عَشَرَ يَوْمًا فَصَاعِدًا، فَيَلْزَمُهُ الْإِتْمَامُ. فَإِنْ نَوَى الْإِقَامَةَ أَقَلَّ مِنْ ذَلِكَ: لَمْ يُتِمَّ.
Translation: The traveller retains travel status until intending to stay in a town fifteen days or more, in which case full prayer is obligatory. If the intended stay is shorter, full prayer is not performed.
The pivotal factor is the settled intention to remain in one place for fifteen days, not merely the passage of time.