Shulchan Arukh, Orach Chayim Siman 562
Can copy this into an AI, or connect the whole library to your assistant. For deeper learning, you can directly use the original seforim, sites, and apps.
כל תענית שלא שקעה עליו חמה דהיינו שלא השלימו עד צאת הכוכבים דהיינו שיראה ג' כוכבים בינונים או שהלבנה זורחת בכח ותאיר על הארץ (הגהות אשירי פ"ק דתענית והגהות מיימוני פ"א) אינו תענית ואם דעתו לאכול קודם לכן אינו מתפלל עננו: הגה מיהו נוהגין להתפלל עננו אע"פ שאין משלימין עד צאת הכוכבים וכן דעת מקצת רבוותא (תה"ד סי' קנ"ז) ונראה לי דדוקא ביחיד דאומר עננו בשומע תפלה דבלאו הכי יכול להוסיף כמו שנתבאר לעיל סי' קי"ט אבל שליח ציבור לא יאמר עננו אא"כ משלימין וכן נוהגין:
The Laws of Accepting a Fast, Contains 13 Sections. Every fast that does not last until sunset - that is, it is not completed until Tzeit HaKochavim, meaning that one can see three medium-sized stars or the moon shines strongly and illuminates the earth (Hagahot Ashiri, Chapter 1 of Taanit and Hagahot Maimonides, Chapter 1) - is not considered a fast. And if one intends to eat before then, one should not recite the 'Aneinu' prayer [in their Amidah]. Rema: However, there is a custom to recite 'Aneinu' even if the fast is not completed until Tzeit HaKochavim, as is the opinion of some authorities (Terumat HaDeshen, section 157). It seems to me that this specifically applies to an individual who says 'Aneinu' in the 'Shomea Tefillah' blessing [in the Amidah], as anyway he can add to it as explained earlier in section 119. However, a prayer leader should not say 'Aneinu' unless the fast is completed, and this is the common practice.
יש אומרים שמי שרגיל להתענות עשרת ימי תשובה כיון שאין רגילות לקבלם בתפלה אין צריך להתענות עד צאת הכוכבים אלא עד שיצא מבה"כ: הגה והיחיד מתפלל עננו (הגהות אשירי ומרדכי פ"ק דתענית) וכן חתן יתפלל עננו קודם שיכנס לחופה ואז יוכל לשתות מכוס של ברכה (תה"ד סימן קנ"ז) אבל מי שמתענה מי"ז בתמוז עד תשעה באב צריך להשלים אע"ג דאינו צריך קבלה וכן מי שאינו מתענה כל עשרת ימי תשובה רק מתענה יום או יומים בעי קבלה והשלמה (תה"ד סי' קמ"ו) ונראה לי דדוקא בסתם אבל אם התנה שלא להשלים הרשות בידו דלא עדיף משאר תענית:
There are those that say one who is used to fasting during the 10 days of Repentance since it is not normal to accept the fast in prayer (i.e. in the Mincha prior to the fast), it is not necessary to fast until Nightfall, rather when one leaves the Synagogue (i.e. after praying the evening service even if prayed prior to Nightfall). Rema: And an individual would pray 'Aneinu' [Haagos Ashiri and Mordechai First Chapter of Taanis]. So to a Groom prays 'Aneinu' before entering into the Chuppah, and then is able to drink from Cup of Blessing (as a part of the wedding service) [Terumas Hadeshen Siman 157]. But one who fasts from the 17th of Tammuz until the 9th of Av, it is necessary to complete even if it is not necessary to accept, so with one who does not fast the whole 10 days of Repentance only fasting a day or days requires an acceptance and completion [Terumas HaDeshen Siman 146]. And it appears to me this is specifically with non-specificity (in the acceptance) but if one made a condition (when accepting the fast) not to complete, the allowance is in his hand, that it is no greater than other fasts.
יחיד שקבל עליו תענית סתם בערב שבת צריך להתענות עד צאת הכוכבים אם לא שפירש בשעת קבלת התענית עד שישלימו הצבור תפלתם: (וע"ל סימן רמ"ט):
An individual who accepts upon himself a fast with non-specificity on the Eve of Shabbos, he needs to fast until Nightfall, if he did not detail at the time of the acceptance of the fast (that the end would only be) until the Congregation completed their prayers (on Friday night). Rema: And also see prior in Siman 249.
תענית חלום צריך להתענות עד צאת הכוכבים ואפי' בע"ש (וע' לעיל סי' רמ"ט סעיף ד'):
A fast for a dream needs to be fasted until tzeit hakochavim, even on a Friday. (And see above, chapter 449:4)
כל תענית שלא קבלו עליו היחיד מבעוד יום אינו תענית: הגה להתפלל עננו ולא לענין אם חייב תענית סתם והתענה כך לא יצא ידי נדרו (מרדכי והגהות מיימוני פ"א) (מיהו) יש אומרים דמתפלל עננו (מרדכי בשם ר"י) וכן נראה לי לנהוג בתענית יחיד ולכולי עלמא המתענה תענית חלום מתפלל עננו אע"פ שלא קבל עליו מאתמול:
Every fast which an individual did not accept upon themself whilst it was still daytime is not a fast. Rema: [not a real fast] to pray Aneinu, and not regarding if the person is obligated in the fast at all; and the person who fasts thusly has not completed their vow (Mordechai and Hagahot Maimoni ch1). There are those that say that one prays Aneinu (Mordechai in the name of the R"i), and so it seems to me to act for the fast of an individual, and universally the one who fasts for a dream prays Aneinu even if they had not accepted it upon themself from yesterday.
אימתי מקבלו בתפלת המנחה אומר בשומע תפל' או אחר שסיים תפלתו קודם שיעקור רגליו הריני בתענית יחיד מחר יהי רצון שתהא תפלתי ביום תעניתי מקובלת ואם לא הוציא בפיו אם הרהר בלבו שהוא מקבל תעני' למחר הוי קבלה והוא שיהרהר כן בשעת תפלת המנחה: הגה וטוב יותר לקבלו אחר תפלה מבשעת תפלה כדי שלא להפסיק תפלתו: (המגיד והגהות מיימוני כל בו וב"י):
When does one accept it? During mincha, one says in Shomea Tefila or after one completes one's prayer but before moving one's legs, "Behold I am in a private fast tomorrow: may it be acceptable that my prayer on the day of my fast is accepted". If one does not say this out loud, if one thought in one's heart that one accepted a fast for the next day this counts as acceptance; this is specifically when one thinks so during the mincha prayer. Rema: and it's better to accept it after prayer than during prayer, in order not to break up one's prayer (Hamagid and Hagahot Maimoni, Kol Bo and Beit Yosef).
קיבל עליו תענית בתפלת המנחה אע"פ שהוא אוכל ושותה בלילה לא הפסיד כלום וכן אם קבל עליו להתענות שלשה או ארבעה ימים או יותר זה אחר זה להתענות בימים ויאכל בלילות אף ע"פ שהוא אוכל כל הלילות לא הפסיד כלום דהוי קבלה לכולם אע"פ שלא קיבל כל אחד ואחד במנחה שלפניו: הגה ואם קיבל להתענות שני ימים רצופין מותר לאכול בלילה שביניהם אם לא פירש בהדיא אף הלילה (מרדכי פ"ק דתענית) ואז מתפלל כל יום במנחה עננו (בפסקי מהרא"י סי' ק"ח):
One who accepted a fast at the mincha prayer, even though they eat and drink at night, has not lost anything. And if they accept upon themself to fast three or four days or more, one after the other, to fast in the days and eat in the nights, even though they eat on each of the nights, has not lost anything. For this is an acceptance for all of them, even though they didn't accept for each individually in the preceding mincha. Rema: and if they accepted to fast two consecutive days, it's permitted to eat in the night between them, if they didn't specify explicitly the night as well (Mordechai, ch1 of Ta'anit) and then they pray each day Aneinu in mincha.
אם קיבל עליו בתפל' המנחה שלשה או ארבע' תעניו' ולא רצופין זה אחר זה כגון שקבל עליו להתענות שני וחמישי שני וכיוצא בזה יש מי שמסתפק אי סגי בקבלה אחת לכלם או אם צריך קבלה לכל אחד ואחד: הגה מיהו נהגו העם לקבלם בקבלה אחת וסגי בהכי וכן דעת מקצת רבוואתא (מרדכי והגהות מיימוני):
If they accepted upon themself during mincha three or four fasts, not consecutively one after the other; for example, they accepted to fast on Monday and Thursday and Monday or similar cases, there are some who question if it's enough to accept them all once or if they need to accept them each individually. Note: and the people are accustomed to accept them with a single acceptance, and this is sufficient, and so is the opinion of some of the רבוואתא [?] (Mordechai and Hagahot Maimoni).
קבל עליו להתענות למחר והתענה ובליל' שאחר התענית נמלך להתענות אע"פ שלן בתעניתו שלא אכל בליל' והתענה כל היום השני אינו תענית מפני שלא קבלו עליו מבעוד יום:
One accepted upon themself to fast tomorrow, and fasted, and in the night after the fast decided to fast, even though they spent the night in a fasting state, that is, did not eat in the night, and fasted all the second day, this is not a fast since they didn't accept it upon themself during the day.
מתענה אדם תענית שעות והוא שלא יאכל כל היום כיצד (הרי) שהי' טרוד בחפציו ומתעסק בצרכיו ולא אכל עד חצות או עד ט' שעות ונמלך להתענות בשעות שנשארו מן היום הרי זה מתענה אותם שעות ומתפלל בהם עננו שהרי קבל עליו התענית קודם שעות התענית ויש אומרים שגם זה תענית שעות צריך שיקבלנו עליו מאתמול והיכי משכחת לה כגון שמקבל עליו מאתמול להתענות עד חצי היום וכשהגיע לחצי היום נמלך וגמרו או שקבל עליו להתענות למחר מחצי היום ואילך ולמחר נמלך ולא אכל גם בחצי היום ראשון הרי זה תענית שעות:
A person can fast a fast of hours, and this is that they do not eat the whole day. How so? Behold they were distracted by their wants and busy by their needs and did not eat until midday or the ninth hour, and decided to fast the remaining hours of the day, behold they fast the hours of the day and pray Aneinu during them, for behold they accepted upon themself the fast before the fast itself began. And some say that the fast of hours too needs to be accepted from yesterday, and how would this come about? For example, one accepted upon oneself yesterday to fast until midday, and when one reaches midday one changes their mind and completes the fast [for all the waking hours], or accepted upon themself to fast tomorrow from noon and onwards, and tomorrow changed their mind and didn't eat also in the first half of the day: behold this is a fast of hours.
אם קבל עליו תענית עד חצי היום ואכל אח"כ או שאכל עד חצי היום וקבל עליו תענית משם ואילך אינו נקרא תענית להתפלל עננו אבל נקרא תענית לענין שצריך להשלים נדרו:
If one accepted upon oneself a fast until midday, and ate after this, or ate until midday and then accepted a fast from that moment onwards, it is not called a fast to pray Aneinu, but is called a fast for the purpose of one needing to complete one's vow.
תענית שגוזרים על הצבור אין כל יחיד צריך לקבלו בתפלת המנחה אלא שליח צבור מכריז התענית והרי הוא מקובל ויש אומרים דהני מילי בארץ ישראל שהיה להם נשיא לפי שגזירתו קיימת על כל ישראל אבל בחוצה לארץ צריכים כל הצבור לקבל על עצמם כיחידים שכל א' מקבל על עצמו:
A fast that was decreed on the community, each individual doesn't need to accept it during mincha, rather the sha"tz announces the fast and behold it is accepted. And some say that these things are in Eretz Yisrael, since they had a Nasi whose decree stood over each Jew, but in the Diaspora the entire community needs to accept it upon themselves as individuals since each of them accept it upon themself.
יש מי שאומר שמי שנדר ואמר אם לא אלך למקום פלוני אשב בתענית מאחר שמה שהתנה הוא דבר הרשות הוי אסמכתא (פי' שאדם סומך בדעתו שיוכל לעשות דבר אחד ועל סמך זה הוא נודר או מתחייב בדבר מה) אבל אם אמר אם לא אעשה מצוה פלונית אשב בתענית וכן אם אמר אם יצילני ה' מצרה או אם יצליח דרכי לא הוי אסמכתא:
There are those who say that the person who vows and says "If I do not go to such and such a place, I will sit in fasting from after there", that the condition is a matter of choice, is a mere support for the statement (asmachta) [?]. (Meaning, a person relies in their mind on being able to do something, and on this assumption they make the vow, or they are obliged in that thing) But if they said "If I do not do such and such a mitzvah, I will sit in fasting", and so if they say "If God saves me from trouble" or "If my path succeeds", this is a support.