The time came for Joseph and Mary to perform the ceremony of purification, as the Law of Moses commanded. So they took the child to Jerusalem to present him to the Lord,
as it is written in the law of the Lord: "Every first-born male is to be dedicated to the Lord." 1
References for Luke 2:23
2.23 Ex 13.2, 12.