Hello. Let’s say that I come from Diocese X, then I move to Archdiocese Y because I need to study in that bigger city. Which one am I subject to and which do I belong to (assuming they’re different). Diocese X or Archdiocese Y?
Is the move considered by you to be permanent? Or just for the duration of the education.
Here are the relevant Canons
Can. 102 §1 Domicile is acquired by residence in the territory of a parish, or at least of a diocese, which is either linked to the intention of remaining there permanently if nothing should occasion its withdrawal, or in fact protracted for a full five years.
§2 Quasi-domicile is acquired by residence in the territory of a parish, or at least of a diocese, which is either linked to the intention of remaining there for three months if nothing should occasion its withdrawal, or in fact protracted for three months.
Can. 107 §1 Both through domicile and through quasi-domicile everyone acquires his or her own parish priest and Ordinary.
§2 The proper parish priest or Ordinary of a vagus is the parish priest or Ordinary of the place where the vagus is actually residing.
§3 The proper parish priest of one who has only a diocesan domicile or quasi-domicile is the parish priest of the place where that person is actually residing.
In either case, if the intent is to live there as your home for over 3 months, then you have acquired (at least) a quasi-domicile, and the pastor and bishop are the ones in Archdiocese Y.
Presuming you intend to return to Diocese X following your studies, and do not intend to permanently remain in Archdiocese Y, you belong to both! I would judge you should follow the particular laws and rulings of whichever one you happen to be in at the time (for instance, if the Solemnity of the Ascension is translated from Thu to Sun in one but not the other).
Can. 102 §1. Domicile is acquired by that residence within the territory of a certain parish or at least of a diocese, which either is joined with the intention of remaining there permanently unless called away or has been protracted for five complete years.
§2. Quasi-domicile is acquired by residence within the territory of a certain parish or at least of a diocese, which either is joined with the intention of remaining there for at least three months unless called away or has in fact been protracted for three months.
Can. 107 §1. Through both domicile and quasi-domicile, each person acquires his or her pastor and ordinary.
Disclaimer: I Am Not A Canon Lawyer
Both answers combined:
You are actually a member of both diocese: one by virtue of domicile, one by virtue of quasi-domicile.
However, if you’ve actually completely moved to the Archdiocese of Y, with no intention of returning except for the occasional visit, then only Y would apply.
Relevant perhaps…that’s all that can be said when cutting and pasting from the Code, because Canon Law is not a one size fits all, absolutely black and white, affair.
An example is a member of the armed forces. There is an Arch Diocese of the Military Service, which military members (who often move around in and outside 3 month windows) belong to.
OP, check with a priest…nobody here, unless they are trained and certified as a canon lawyer can definitively answer questions with Canon Law.