The Lubavitcher Rebbe, Rabbi Menachem Mendel Schneerson, zt”l, notes that Yaakov Avinu’s years can be divided into three periods.
The opening pasuk in this week’s parshah states: “Vayechi Yaakov be’eretz Mitzrayim sheva esrei shanah… – Yaakov lived in Mitzrayim for 17 years…” The Gemara in Kiddushin 82a says that Avraham Avinu kept the entire Torah, even the mitzvos that may not have applied.