Reference for Bekhorot 4:1
עַד כַּמָּה יִשְׂרָאֵל חַיָּבִים לְהִטַּפֵּל בַּבְּכוֹר. בִּבְהֵמָה דַקָּה, עַד שְׁלשִׁים יוֹם. וּבַגַּסָּה, חֲמִשִּׁים יוֹם. רַבִּי יוֹסֵי אוֹמֵר, בַּדַּקָּה שְׁלשָׁה חֳדָשִׁים. אָמַר לוֹ הַכֹּהֵן בְּתוֹךְ זְמַן זֶה תְּנֵהוּ לִי, הֲרֵי זֶה לֹא יִתְּנוֹ לוֹ. אִם הָיָה בַעַל מוּם, אָמַר לוֹ תֶּן לִי שֶׁאוֹכְלֶנּוּ, מֻתָּר. וּבִשְׁעַת הַמִּקְדָּשׁ, אִם הָיָה תָמִים, אָמַר לוֹ תֶּן לִי שֶׁאַקְרִיבֶנּוּ, מֻתָּר. הַבְּכוֹר נֶאֱכָל שָׁנָה בְשָׁנָה בֵּין תָּמִים בֵּין בַּעַל מוּם, שֶׁנֶּאֱמַר (דברים טו), לִפְנֵי ה' אֱלֹהֶיךָ תֹאכְלֶנּוּ שָׁנָה בְשָׁנָה:
How long must an Israelite tend to the first born? Thirty days for a sheep or goat, and fifty days for a cow. Rabbi Yossi says: Three months for a sheep or goat. If the priest says to [the owner] during that time: "Give it to me", [the owner] does not give it to [the priest]. If it was blemished and [the priest] says to [the owner]: "Give it to me so I can eat it", it is permitted [to give it to the priest]. During the time of the Temple, if it is unblemished, and [the priest] says to [the owner]: "Give it to me so I can offer it", it is permitted [to give it to the priest]. The first born is eaten year by year, whether unblemished or blemished, as it is said (Deuteronomy 15:20): "You will eat it before God year by year".