** Go to www.dailyhalacha.com and click on ‘Matanot La’evyonim’ to fulfill the misva of giving to the needy on Purim, and have Rabbi Eli Mansour distribute the funds for you. **
On the festival of Purim one must add the paragraph of "Al Ha'nisim… Bimei Mordechai Ve'Ester…" in the Shemona Esre prayer as well as in Birkat Ha'mazon.
If a person began his meal on the day of Purim, but the meal continued into the night, until after Purim ended, does he add "Al Ha'nisim" in Birkat Ha'mazon? Does this requirement depend on the beginning of the meal, in which case one would add "Al Ha'nisim" regardless of when the meal ended, so long as it began during Purim, or does it depend upon the conclusion of the meal?
In the context of Shabbat, the Shulhan Aruch rules explicitly that the special insert for Shabbat ("Rese") is added in Birkat Ha'mazon after any meal that began on Shabbat, regardless of when the meal ends. Even if the meal ends well after dark, one nevertheless adds "Rese" in Birkat Ha'mazon, so long as the meal began before Shabbat ended. This ruling applies to Yom Tov, as well: if a person began his meal on Yom Tov and the meal extended until after Yom Tov, he adds "Ya'aleh Ve'yavo" in Birkat Ha'mazon, even though Yom Tov has already ended. (The Kaf Ha'haim rules against this view, and writes that since this issue is subject to debate among the authorities, one should not add "Rese" or "Ya'aleh Ve'yavo" in Birkat Ha'mazon if the meal ends after the conclusion of Shabbat or Yom Tov. The accepted Halacha, however, follows the position of the Shulhan Aruch.) Does this ruling apply to adding "Al Ha'nisim" on Purim, as well?
The Ben Ish Hai (Rabbi Yosef Haim of Baghdad, 1833-1909) does not address this particular question, but does discuss the related question of reciting "Al Ha'nisim" in Birkat Ha'mazon on the night after Hanukah. In his view, if a person begins a meal on the final day of Hanukah and the meal extends into the night, he does not add "Al Ha'nisim" in Birkat Ha'mazon. According to the Ben Ish Hai, the aforementioned ruling of the Shulhan Aruch applies only on Shabbat and Yom Tov, when there is a Halachic obligation to eat a meal. On Hanukah, Halacha does not, strictly speaking, require eating a meal. This affects the addition of "Al Ha'nisim" in Birkat Ha'mazon, in the sense that it is added only if one recites Birkat Ha'mazon on Hanukah itself.
As mentioned, the Ben Ish Hai does not explicitly address the case of a Purim meal that extends until after the conclusion of Purim. One might suggest that Purim, on which one indeed bears an obligation to eat a meal, would resemble Shabbat and Yom Tov in this regard, and thus one should add "Al Ha'nisim" in Birkat Ha'mazon even if the meal extends until after dark.
In any event, Hacham Ovadia Yosef disputes the Ben Ish Hai's ruling, and maintains that in all cases, including Hanukah, the determining factor is the point at which the meal began. Regardless of when the meal ends, one adds the relevant insertion in Birkat Ha'mazon based on the time at which one began the meal. This is also the position of the Hid"a (Rav Haim Yosef David Azulai, 1724-1806). Thus, if one's Purim meal extended until after Purim, he nevertheless adds "Al Ha'nisim" in Birkat Ha'mazon.
Summary: On Purim one adds "Al Ha'nisim" when reciting Birkat Ha'mazon after any meal. Even if the meal ends after dark, so long as it began during Purim one adds "Al Ha'nisim" in Birkat Ha'mazon.
** Special Note for years when Puim when falls out on a Friday- The festive Purim meal must begin before mid-day on Friday. One may not be ‘full’ going into Shabbat, as one must not interfere his Oneg Shabbat. (For more on this topic see the Daily Halacha entitled "Meals on Erev Shabbat.")