For the purpose of applying Article 19 the competent authority of the United Kingdom shall take account only of insurance periods completed under the legislation of either Party which would be taken into account for the determination of pensions under the legislation of the United Kingdom if they had been completed under its legislation, and shall, where appropriate, take into account in accordance with its legislation insurance periods completed by a spouse or civil partner, or former spouse or former civil partner, as the case may be.