When it comes to the purpose of a holiday, there are two verses which seem to contradict each other. One verse tells us that the holiday is for God: “You shall hold a joyous gathering for the Lord your God (atzeret laShem Elokekha)” (Devarim 16:8), while the other says that it is for you: “On the eighth day you shall hold a joyous gathering for yourselves (atzeret tihyeh lakhem)” (Bamidbar 29:35). The Gemara presents two ways to reconcile the verses. According to R. Yehoshua, the Torah is telling us that we should split up the holiday so “half is for God and half is for you” – meaning half the day is spent on food and drink, and half is spent learning Torah in the beit midrash. In R. Eliezer’s opinion, a person may choose – either the whole day is “for God” spent in the beit midrash, or the whole day is “for you” spent eating (Pesaḥim 68b; Beitza 15b). Even if one chooses to follow R. Eliezer and spend all day learning Torah, he must still eat something so that he will not suffer from hunger, while if one chooses to spend all day eating, he must still pray and learn some Torah in the morning and at night, and also have words of Torah at the meal (Rabbeinu Peretz; Ra’ah; Shelah). Furthermore, if one chooses to spend all day eating, this choice must be made for the sake of heaven, in order to enjoy the sanctity of the holiday and to provide enjoyment for poor and lonely people (Pri Tzadik, Ḥag Ha-Shavu’ot §5; see section 11 below).
In practice, the halakha follows R. Yehoshua, so we should split up the day and spend half learning in the beit midrash and half eating and drinking (SA 529:1). Some maintain that one must be very careful that the “half for God” is indeed at least half. Or Ha-ḥayim declares that if one takes more than half the day for himself, that extra part is considered stolen property (Rishon Le-Tziyon, Beitza 15b). Others maintain that it is not necessary to calculate precisely; one should just learn Torah approximately half the day (Pri Megadim). Usually people do not calculate the hours; unfortunately, the result is that we are very derelict about the time we dedicate to Torah. In order to revitalize this mitzva, we need to start calculating the hours and becoming accustomed to dedicating half the time to God. It would seem that the seven hours that a person normally sleeps can be left out of the calculation. Since a day of Yom Tov with tosefet lasts approximately 25 hours, there are then 18 hours remaining. Half of this time – nine hours – must be dedicated to God. While most of it needs to be dedicated to Torah study (“half for the beit midrash” in the words of Pesaḥim 68b), prayer can also count toward this half. However, this is on condition that the prayer service is not too drawn out with melodies or cantorial renditions; if it is, that time cannot be considered God’s half (Yam Shel Shlomo; MA). It seems reasonable that out of the nine hours for God, three may be used for prayer, but the remaining six should be devoted to Torah study.
Women too have a mitzva to study Torah on Yom Tov, and indeed, women customarily attended the derashot given on Shabbat and Yom Tov. Although women are not obligated to dedicate half of the day to God, one who does so is worthy of blessing.
Many maintain that R. Eliezer does not mean that one should dedicate 100% of the day to God or 100% to ourselves. Even one who learns Torah all day needs to eat something so he won’t be fasting and suffering on the holiday. Rather, R. Eliezer means that if one chooses to devote the whole day to study, he does not need to have a significant meal. Likewise, one who wishes to set aside the whole day “for you” – festive meals and physical pleasure – is still required to pray and to study a little Torah, as is required every day (Rabbeinu Peretz and Ra’ah, Beitza 15b; Shelah, Masekhet Shavu’ot, Torah Or 16). According to Me’iri (Beitza loc. cit.), if one was so involved in his Torah study that he neglected to eat anything at all, he has still fulfilled the mitzva of Yom Tov. According to Sefat Emet (Beitza loc. cit.), even R. Eliezer agrees that one may split up the day into two equal parts; what he means is that it is also acceptable to choose to devote the day entirely “for God” or entirely “for you.” (It should be noted that when it comes to prayer as well, R. Eliezer is of the opinion that the primary mitzva is dependent upon the person’s choice, in accordance with m. Berakhot 4:4: “If one makes his prayer set [and unchanging], his prayer is not supplicatory.”)
It would seem that according to R. Yehoshua, one may count the time praying as part of the half for God. This is the conclusion one reaches after reading through Rambam’s Yom Tov schedule, and it is cited in SAH 529:10 and MB ad loc. 1. (See Harḥavot to Peninei Halakha: Shabbat, vol. 1, 5:1 n. 10.) Nevertheless, most of the half for God must be devoted to Torah study. This is why R. Yehoshua’s formulation in Pesaḥim 68b is “half for the beit midrash.” In his time, the beit knesset dedicated to prayer was a separate building from the beit midrash dedicated to study.
Some say that according to R. Yehoshua, one must be very precise regarding the half for God. For example, Or Ha-ḥayim states that if one extends his lunch and does not make up the time in the afternoon, it is as if he has stolen some of God’s part of the day (Rishon Le-Tziyon, Beitza loc. cit.). Others are of a similar opinion, including Baḥ, OḤ 242; Pnei Yehoshu’a, Beitza loc. cit.; Sha’agat Aryeh §69; Kaf Ha-ḥayim 529:10. It also would seem to be the opinion of Yam Shel Shlomo (Ḥullin, ch. 1 §50) and MA (introduction to OḤ 529) that we should scold cantors who drag out the prayers, as that time is not included in the half for God. On the other hand, some are of the opinion that there is no need to be exact here. Pri Megadim states this explicitly (Eshel Avraham 242:1), as does Sefat Emet (Beitza loc. cit.). Some feel that this can be inferred from those who cite R. Yehoshua without specifying how the day is to be split up. Nevertheless, it would seem that even according to them, one is obligated to study Torah for a little less than half the day. Perhaps they mean that one may learn more than half the time on one holiday, and less than half the time on another, so that things average out at about half the time. Since we see that people are not meticulous about the number of hours they spend studying Torah, in my humble opinion, even those who are less exacting would agree that today it is necessary to calculate the hours of Yom Tov in the way I detailed above, in order to restore Torah study on Yom Tov to its proper place. The calculation should include the night as well, as it is part of Yom Tov. Indeed, we find that there were study sessions which convened at night (t. Beitza 2:6; Tosafot, Pesaḥim 109a). However, one may leave out of the calculation the time he needs to sleep, which leaves us with nine hours of Yom Tov which must be devoted to God.
It would seem that even though one must be careful not to dedicate less than half the day to God, nevertheless if one properly observes the mitzva of simḥa at the festive meal by eating meat and drinking wine, and still has time left in his “half for you,” he may add to his Torah study. This does not detract from the mitzva. The difference is that how to fulfill the part “for God” is not at a person’s discretion, but rather is designated as learning Torah, while how to fulfill the part “for you” is at a person’s discretion. If this were not the case, what options would there be for one who has already spent three hours at a meal, cannot eat any more, and does not want to sleep? Would he be obligated to speak about secular matters in order to fulfill the “half for you”? Furthermore, even during a meal it is proper to share much Torah (Avot 3:3; San. 101a). Would it cross anyone’s mind to say that if he has already fulfilled his half for God, he may not share words of Torah at the table? Rather, the fundamental lesson we learn from R. Yehoshua is that it is obligatory to dedicate the appropriate amount of time to a significant meal. This is addressed in Shabbat 119b, where R. Zeira warns that Torah scholars should not engage in so much Torah study that it is at the expense of oneg Shabbat. See the Harḥavot here and the Harḥavot to Shabbat 5:1-4, for the many sources which I cite for this halakha.