Article 80F of the Law
(1) T spends more days of a year in Scotland than in any other part of the
UK if (and only if) the number of days in the year on which T is in Scotland at the end of the day exceeds each of the following—
(a) the number of days in the year on which T is in England at the end of the day;
(b) the number of days in the year on which T is in Wales at the end of the day;
(c) the number of days in the year on which T is in Northern Ireland at the end of the day.
(2) T is treated as not being in the
UK
at the end of a day if—
(a) on that day T arrives in the
UK
as a passenger,
(b) T departs from the
UK
on the next day, and
(c) during the time between arrival and departure T does not engage in activities which are to a substantial extent unrelated to T's passage through the UK.